// JavaScript Document
var xmlHttp;
function showState(str)
 { 
 xmlHttp=GetXmlHttpObject()
 if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
 var url="responsestate.php"
 url=url+"?q="+str;
 url=url+"&sid="+Math.random();
 xmlHttp.onreadystatechange=stateChanged; 
 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
 };
 function stateChanged(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
 xmlDoc=xmlHttp.responseXML;
 document.getElementById("mystate").innerHTML=xmlHttp.responseText;
}
 
};
function GetXmlHttpObject()
 { 
 var objXMLHttp=null
 if (window.XMLHttpRequest)
  {
  objXMLHttp=new XMLHttpRequest()
  }
 else if (window.ActiveXObject)
  {
  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
 return objXMLHttp
 }
// --------------------------------------------------------
 var xmlHttp1;
function showDistrict(str1)
 { 
 xmlHttp1=GetXmlHttpObject()
 if (xmlHttp1==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
 var url1="responsedistrict.php"
 url1=url1+"?q1="+str1;
 url1=url1+"&sid="+Math.random();
 xmlHttp1.onreadystatechange=stateChanged1; 
 xmlHttp1.open("GET",url1,true);
 xmlHttp1.send(null);
 };
 function stateChanged1(){ 
if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
{
 xmlDoc1=xmlHttp1.responseXML;
 document.getElementById("mydistrict").innerHTML=xmlHttp1.responseText;
} 
 
};

//---------------------------------------------------------------------------
var xmlHttp2;
function showPin(str2)
 { 
 xmlHttp2=GetXmlHttpObject()
 if (xmlHttp2==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
 var url2="responsepin.php"
 url2=url2+"?q2="+str2;
 url2=url2+"&sid="+Math.random();
 xmlHttp2.onreadystatechange=stateChanged2; 
 xmlHttp2.open("GET",url2,true);
 xmlHttp2.send(null);
 };
 function stateChanged2(){ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
{
 xmlDoc2=xmlHttp2.responseXML;
 document.getElementById("mypin").innerHTML=xmlHttp2.responseText;
} 
 
};