var xmlHttp

function showcity(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="GetCity.asp";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{ 

var s1; 
var arrs ;

if (xmlHttp.readyState==4)
{ 
s1=xmlHttp.responseText;
arrs =s1.split("@");
window.document.myform.listbox2.length=0

 
          
		for(i=0;i<arrs.length;i++)
				{

				   Ascii2Char=""                 
				   newarrs = arrs[i].split("!-");
				   //debugger
				   //myform.listbox2.options[i] = new Option(Ascii2Char(newarrs[1]),newarrs[0]);
				   //ss=Ascii2Char(newarrs[1]);
				   str=(newarrs[1]);
				   newstr = str.split(" ")
				   for (j=0;j<=newstr.length;j++)
				   		  
	               Ascii2Char= Ascii2Char+ String.fromCharCode(newstr[j]);
	               
	               	
      	
      		       
                   myform.listbox2.options[i] = new Option(Ascii2Char,newarrs[0]);
				   

				}
				
				total = i;
		myform.listbox2.options[total] = new Option("انتخاب کنيد","");
         myform.listbox2.options[total].selected = true
          
          
//document.getElementById("txtHint").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;
}


