function GetXmlHttpObject(handler)
{
   var objXMLHttp=null   
   
   if (window.XMLHttpRequest)   
   {
       objXMLHttp=new XMLHttpRequest()
   }   
   else if (window.ActiveXObject)   
   {
       objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")   
   }    

   return objXMLHttp
}





// functions used by the formular on the SELL page
function sell_regionstateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("region_sell").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}
function sell_citystateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("city_sell").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}

// Will populate data based on input
function sell_FindRegions(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("region_sell").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=sell_regionstateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }

 function sell_FindCities(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("city_sell").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=sell_citystateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }
 
 
 
 
 
 
 
 
 
 // functions used by the SEARCH formular on MOTOS page
function search_regionstateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("region_search").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}
function search_citystateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("city_search").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}

// Will populate data based on input
function search_FindRegions(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("region_search").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=search_regionstateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }

 function search_FindCities(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("city_search").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=search_citystateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }
 
 
 
 
 
 
 
 
 // functions used by the MENU formular used on EVERY PAGE
function menu_regionstateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("region_menu").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}
function menu_citystateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("city_menu").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}

// Will populate data based on input
function menu_FindRegions(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("region_menu").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=menu_regionstateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }

 function menu_FindCities(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("city_menu").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=menu_citystateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }












// functions used by the formular on the HOME page for searching dealers
function home_regionstateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("region_home").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}
function home_citystateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("city_home").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}

// Will populate data based on input
function home_FindRegions(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("region_home").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=home_regionstateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }

 function home_FindCities(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("city_home").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=home_citystateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }





 
 
 
 
 
 
 
 
 // functions used by the Address formular used in CONTROL PANEL
function address_regionstateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("region_address").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}
function address_citystateChanged()
{   
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")   
   {
       document.getElementById("city_address").innerHTML= xmlHttp.responseText;   
   } 
   else 
   {
       //alert(xmlHttp.status);   
   }
}

// Will populate data based on input
function address_FindRegions(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("region_address").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=address_regionstateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }

 function address_FindCities(url, qStr)
{   
   if (url.length==0)   
   {
       document.getElementById("city_address").innerHTML="";     
       return;   
   }   
   
   xmlHttp=GetXmlHttpObject()  
   if (xmlHttp==null)
   {  
       alert ("Browser does not support HTTP Request");    
       return;   
   }   
 
   url=url+"?"+qStr;  
   url=url+"&sid="+Math.random(); 
   xmlHttp.onreadystatechange=address_citystateChanged; 
   xmlHttp.open("GET",url,true) ; 
   xmlHttp.send(null);
 }