var req;function sjax_xml_loader(url,method){req=false;if(window.XMLHttpRequest){try{req=new XMLHttpRequest();}catch(e){req=false;}}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){req=false;}}}if(req){if(method==""){req.onreadystatechange=sjax_handler;req.open("GET",url,true);req.send("");}else if(method=="post"){req.onreadystatechange=sjax_handler;req.open("POST",url,true);req.send("");}}}
function sjax_handler(){show(i_d('loader-icon'));if (req.readyState==4){if(req.status==200){hide(i_d('loader-icon'));content=req.responseXML.documentElement;sjax_parse_xml(content);}else{alert("There was a problem retrieving the XML data:\n" + req.statusText);}}}
function check_make(a,b){var b=typeof(b)!='undefined'?b:'';var url='class/xml/vehicle_make_models.xml.php?make='+a;sjax_xml_loader(url,'');}
function sjax_parse_xml(xml){var models=xml.firstChild.firstChild.childNodes;var mo=i_d('model');mo.innerHTML='';mo.options[0]=new Option('Select');mo.options[1]=new Option('-----------------');var oi=2;for(var i=0;i<models.length;i++){var no=new Option();no.text=models[i].firstChild.nodeValue;no.value=models[i].attributes[0].nodeValue;mo.options[oi]=no;oi++;}}
