var xmlHttp
function FillModel(id)
{
document.all.loading3.style.visibility = "visible";
document.getElementById("nModelID2").disabled = true;
document.getElementById("nYearID2").disabled = true;
document.getElementById("nLocationID2").disabled = true;
table = "model";
xmlHttp=GetXmlHttpObject2();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="fill.php";
url=url+"?q="+id+"&pass="+table;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged2;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged2() 
{ 
if (xmlHttp.readyState==4)
{
//var xmlDoc=xmlHttp.responseXML.documentElement;
document.getElementById("model").innerHTML = xmlHttp.responseText;
document.getElementById("year").innerHTML = "<select name='nYearID2' id='nYearID2' style='font-family:Verdana;font-size:Smaller;height:15px;width:130px;'><option value=''>Any Year</option></select>";
document.getElementById("location").innerHTML = "<select name='nLocationID2' id='nLocationID2' style='font-family:Verdana;font-size:Smaller;height:15px;width:130px;'><option value=''>Any Location</option></select>";
document.all.loading3.style.visibility = "hidden";
document.getElementById("nModelID2").disabled = false;
document.getElementById("nYearID2").disabled = false;
document.getElementById("nLocationID2").disabled = false;
}
}

function GetXmlHttpObject2()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}