// JavaScript Document


//________________________________________________

var xmlHttp3

function changepage(pid,whicone,to)
{ 
i=new Array("pageid",1);
i=i.join("_");

scroll(0,0);
xmlHttp3=GetXmlHttpObject()
if (xmlHttp3==null)
{
alert ("Browser does not support HTTP Request")
return
}

var yes=1;

if(whicone==0)
{
var url3="home.php"
url3=url3+"?cid="+pid
}

if(whicone==1)
{
var url3="user.php"
url3=url3+"?cid="+pid

}
if(whicone==2)
{
var url3="requests.php"
url3=url3+"?cid="+pid
}

if(whicone==3)
{
var url3="request.php"
url3=url3+"?cid="+pid
}

if(whicone==4)
{
var url3="blood.php"
url3=url3+"?later="+to
}

if(whicone==5)
{
var url3="details.php"
url3=url3+"?id="+pid+"&counter="+to+"&limit="+5;
}

if(whicone==6)
{
var url3="tell.php"
url3=url3+"?cid="+pid
}

if(whicone==7)
{
var url3="contact.php"
url3=url3+"?cid="+pid
}

if(whicone==8)
{
var url3="forgot.php"
url3=url3+"?cid="+pid
}

if(whicone==9)
{
var bid=document.getElementById("group_id1").value;	
var cid=document.getElementById("countryid1").value;	
var sid=document.getElementById("stateid1").value;	
var did=document.getElementById("districtid1").value;	
var aid=document.getElementById("areaid1").value;	
var pin=document.getElementById("pincode1").value;
var newarae2=document.getElementById("newarae2").value;
//alert(newarae2);
var counter=0;
var limit=10;

var url3="search.php"
url3=url3+"?cid="+pid+"&counter="+counter+"&limit="+limit+"&cid="+cid+"&sid="+sid+"&did="+did+"&aid="+aid+"&pin="+pin+"&bid="+bid+"&newarea="+newarae2
}

if(whicone==10)
{
var bid=document.getElementById("group_id1").value;	
var cid=document.getElementById("countryid1").value;	
var sid=document.getElementById("stateid1").value;	
var did=document.getElementById("districtid1").value;	
var aid=document.getElementById("areaid1").value;	
var pin=document.getElementById("pincode1").value;
var newarae2=document.getElementById("newarae2").value;
var url3="search.php"
url3=url3+"?cid="+pid+"&counter="+pid+"&limit="+to+"&cid="+cid+"&sid="+sid+"&did="+did+"&aid="+aid+"&pin="+pin+"&bid="+bid+"&newarea="+newarae2
}

/////////////////////////////////////////////////////

/////////////////////////////
if(whicone==11)
{
var url3="mission.php"
url3=url3+"?cid="+pid
}

if(whicone==12)
{


var caption=document.getElementById("caption").value;
 
 var printContent = document.getElementById("pid");
 var windowUrl = 'about:blank';
 var uniqueName = new Date();
 var windowName = 'Print' + uniqueName.getTime();
 var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');

 printWindow.document.write(printContent.innerHTML);
 printWindow.document.close();
 printWindow.focus();
 printWindow.print();
 printWindow.close();
  
var url3="report.php"
url3=url3+"?cid="+pid+"&caption="+caption+"&userid="+to;

}

/////////////////////////



if(yes==1)
{
url3=url3+"&s1111id="+Math.random()
xmlHttp3.onreadystatechange=stateChanged3
xmlHttp3.open("GET",url3,true)
xmlHttp3.send(null)
}




}

function stateChanged3()
{
if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")
{ 
document.getElementById(i).innerHTML=xmlHttp3.responseText 
} 
else
{
document.getElementById(i).innerHTML="<div style='margin-top:35%; margin-left:45%; margin-right:45%;'><img src=image/loading.gif></div>"; 
}
}
function GetXmlHttpObject()
{
var xmlHttp3=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp3=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp3=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp3;
}		
////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////
function w_open()
{
	
var bid=document.getElementById("group_id1").value;	
var cid=document.getElementById("countryid1").value;	
var sid=document.getElementById("stateid1").value;	
var did=document.getElementById("districtid1").value;	
var aid=document.getElementById("areaid1").value;	
var pin=document.getElementById("pincode1").value;
var newarae2=document.getElementById("newarae2").value;

var url='search_email.php';
url=url+"?cid="+cid+"&sid="+sid+"&did="+did+"&aid="+aid+"&pin="+pin+"&bid="+bid+"&newarea="+newarae2+"&counter="+0
window.open(url,"child","width=1100,height=950,scrollbars=yes,resizable=1")

//alert("yes2");
}

function w_open2()
{
var url='terms.php';
window.open(url,"child","width=1100,height=950,scrollbars=yes,resizable=1")
}



