// JavaScript Document

function stateChanged_header() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("states_header").innerHTML=xmlHttp.responseText;
 } 
}
function stateChanged1_header() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("cities_header").innerHTML=xmlHttp.responseText;
 } 
}

 function Ajaxcountry_header(cat_id)
{
	xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="ajax/ajax_states.php";
url=url+"?auto="+cat_id;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged_header;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
	  
 

 }
 
 function Ajaxstates_header(cat_id)
{
	xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="ajax/ajax_cities.php";
url=url+"?auto="+cat_id;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged1_header;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
	  
 

 }



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;
}

