// JavaScript Document
var ajaxObject = false;
var ajaxObject2 = false;
	
function statelength() 
{	
	document.getElementById("state_length").innerHTML='<img src="images/loading.gif" border=0 alt=""/>';
	if (ajaxObject2.readyState==4)
	{
	response_array=ajaxObject2.responseText.split("@@@@@");
		
	document.getElementById("state_length").innerHTML=response_array[0];
	}
}	
function getStyle_size(st,color,prd,len,osCsid)
{
  if (window.XMLHttpRequest) { // Gecko, KHTML/WebKit, and IE7 apparently

	  ajaxObject = new XMLHttpRequest();

	  if (ajaxObject.overrideMimeType) {

		  ajaxObject.overrideMimeType('text/xml');

		  // ^ is for older Mozilla-based browsers

	  }

  } else if (window.ActiveXObject) { // IE5 or IE6

	  try {
 // IE has two methods of calling the object, typical!

		  ajaxObject = new ActiveXObject("Msxml2.XMLHTTP");

	  } catch (e) {

		  try {

			  ajaxObject = new ActiveXObject("Microsoft.XMLHTTP");

		  } catch (e) {}

	  }

  }
  var url="_ajax_color.php";

	url=url+"?st="+st+"&color="+color+"&prd="+prd+"&len="+len+"&osCsid="+osCsid;
	ajaxObject.onreadystatechange=statechanged;
	ajaxObject.open("GET",url,true);	
	ajaxObject.send(null);
}
function getSize(st,color,prd,osCsid)
{
  if (window.XMLHttpRequest) { // Gecko, KHTML/WebKit, and IE7 apparently

	  ajaxObject2 = new XMLHttpRequest();

	  if (ajaxObject2.overrideMimeType) {

		  ajaxObject2.overrideMimeType('text/xml');

		  // ^ is for older Mozilla-based browsers

	  }

  } else if (window.ActiveXObject) { // IE5 or IE6

	  try {
 // IE has two methods of calling the object, typical!

		  ajaxObject2 = new ActiveXObject("Msxml2.XMLHTTP");

	  } catch (e) {

		  try {

			  ajaxObject2 = new ActiveXObject("Microsoft.XMLHTTP");

		  } catch (e) {}

	  }

  }
  var url="_ajax_size.php";

	url=url+"?st="+st+"&color="+color+"&prd="+prd+"&osCsid="+osCsid;
	ajaxObject2.onreadystatechange=statelength;
	ajaxObject2.open("GET",url,true);	
	ajaxObject2.send(null);
	
}
function getStyleColor(st,color,prd,osCsid){
	
	getSize(st,color,prd,osCsid);
	
	if (window.XMLHttpRequest) { // Gecko, KHTML/WebKit, and IE7 apparently

	  ajaxObject = new XMLHttpRequest();

	  if (ajaxObject.overrideMimeType) {

		  ajaxObject.overrideMimeType('text/xml');

		  // ^ is for older Mozilla-based browsers

	  }

  } else if (window.ActiveXObject) { // IE5 or IE6

	  try {
 // IE has two methods of calling the object, typical!

		  ajaxObject = new ActiveXObject("Msxml2.XMLHTTP");

	  } catch (e) {

		  try {

			  ajaxObject = new ActiveXObject("Microsoft.XMLHTTP");

		  } catch (e) {}

	  }

  }
/*	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } */
	var url="_ajax_color.php";

	url=url+"?st="+st+"&color="+color+"&prd="+prd+"&osCsid="+osCsid;
	ajaxObject.onreadystatechange=statechanged;
	ajaxObject.open("GET",url,true);	
	ajaxObject.send(null);
	
	} 
function statechanged() 
{	
	document.getElementById("stylecontent").innerHTML='<img src="images/loading.gif" border=0 alt=""/>';
	if (ajaxObject.readyState==4)
	{
	response_array=ajaxObject.responseText.split("@@@@@");
		
	document.getElementById("stylecontent").innerHTML=response_array[0];
	}
}	

	


