document.indi=new Image;
document.indi.src='http://localhost/marriagerep.com/localhost/images/indicator.gif';
var xmlHttpfunction;
function showproducts(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="aj_search.php";
url=url+"?state="+str+"&sid="+Math.random();
url=url+"&sid="+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.send(null);
}
function stateChanged()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("productsdiv").innerHTML=xmlHttp.responseText;
 }
 else{
 document.getElementById("productsdiv").innerHTML="&nbsp;";
 document.getElementById("productsdiv").appendChild(document.indi);
 }
}

function showproducts1(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url1="aj_caste.php";
url1=url1+"?religion="+str+"&sid="+Math.random();
url1=url1+"&sid="+Math.random();
$a=url1;
xmlHttp.open("GET",url1,true);
xmlHttp.onreadystatechange=stateChanged1;
xmlHttp.send(null);
}

function stateChanged1()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("productsdiv1").innerHTML=xmlHttp.responseText;
 }
 else{
 document.getElementById("productsdiv1").innerHTML="&nbsp;";
 document.getElementById("productsdiv1").appendChild(document.indi);
 }
}


function showproducts2(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url1="aj_caste.php";
url1=url1+"?religion="+str+"&sid="+Math.random();
url1=url1+"&sid="+Math.random();
$a=url1;
xmlHttp.open("GET",url1,true);
xmlHttp.onreadystatechange=stateChanged2;
xmlHttp.send(null);
}

function stateChanged2()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("productsdiv2").innerHTML=xmlHttp.responseText;
 }
 else{
 document.getElementById("productsdiv2").innerHTML="&nbsp;";
 document.getElementById("productsdiv2").appendChild(document.indi);
 }
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
