var xmlHttp

function showMount(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="t2.php"
url=url+"?model="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedModel
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
document.getElementById("mount").innerHTML="Choose Model From Above";
}

function showModel(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="t2.php"
url=url+"?make="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedMake
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
document.getElementById("mount").innerHTML="Choose Model From Above";
 if ( str == "" ) {
	 xmlHttp.onreadystatechange=stateChangedMake
     xmlHttp.open("GET","#",true)
     xmlHttp.send(null)
	 document.getElementById("model").innerHTML="N/A";
 }
}


function stateChangedMake() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
   document.getElementById("model").innerHTML=xmlHttp.responseText 
   } 
} 

function stateChangedModel() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
   document.getElementById("mount").innerHTML=xmlHttp.responseText 
   } 
} 


function GetXmlHttpObject()
{
  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;
}
