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;
}

var xmlHttp

function showSearchCitiesLocation(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="cityAction.do?state=" + str
xmlHttp.open("GET",url,true)
xmlHttp.onreadystatechange=stateChangedLocation 
xmlHttp.send(null)
}


function stateChangedLocation() 
{ 
	//alert (xmlHttp.responseText)
	//alert (xmlHttp.readyState)
	//alert (xmlHttp.status)
if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
 { 
 document.getElementById("hintCities").innerHTML = xmlHttp.responseText
 } else 
if(xmlHttp.readyState == 1)
 {
 document.getElementById('hintCities').innerHTML = "<img src='img/ajax-loader-pink.gif' />";
 }
}
