var xmlHttp;

function getXMLHttp() {
	var xmlHttp1;
	try {  // Firefox, Opera 8.0+, Safari
		xmlHttp1=new XMLHttpRequest();
	} catch (e) {
		// Internet Explorer
		try {
			xmlHttp1=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser does not support AJAX!");
				return null;
			}
		}
	}
	return xmlHttp1;
}


var ncatorder = new Array();

//
function GetModel(value)
{	
	//alert(value);
   xmlHttp = null;
    xmlHttp = getXMLHttp();

    if(xmlHttp == null)
        return;
		
var url="ajax/getmodel.php?make="+value;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged()
{
 if(xmlHttp.readyState == 4 && xmlHttp.status == 200){

  document.getElementById("s_model").innerHTML=xmlHttp.responseText;
  }
}

function getparts()
{	
	
   xmlHttp = null;
    xmlHttp = getXMLHttp();

    if(xmlHttp == null)
        return;
		
var url="ajax/getparts.php";
xmlHttp.onreadystatechange=stateChangedp;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChangedp()
{
 if(xmlHttp.readyState == 4 && xmlHttp.status == 200){

  document.getElementById("searchid").innerHTML=xmlHttp.responseText;
  }
}

function getpreowned()
{	
	
   xmlHttp = null;
    xmlHttp = getXMLHttp();

    if(xmlHttp == null)
        return;
		
var url="ajax/getpreowned.php";
xmlHttp.onreadystatechange=stateChangedpr;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChangedpr()
{
 if(xmlHttp.readyState == 4 && xmlHttp.status == 200){

  document.getElementById("searchid").innerHTML=xmlHttp.responseText;
  }
}



