var xmlHttp1;
function verificationCode(mobile)
{
	xmlHttp1=GetXmlHttpObject()
	if (xmlHttp1==null)
	{
	  alert ("Browser does not support HTTP Request")
	  return
	} 
	var url="verifymobile.php"
	url=url+"?verifyMobile="+mobile;
	//alert(url);
	xmlHttp1.onreadystatechange=stateChanged 
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
} 

function stateChanged() 
{ 
	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
	{  
		string=xmlHttp1.responseText;
		var val = string.split("|");
		//alert(val);
		document.getElementById("verifcation_code").value=val;
		document.getElementById("loadingDiv").innerHTML="<font color='#0070A6' size='1'>You Will Receive A Verification Code On Your Mobile Shortly, Please Wait!!!</font>";
	}
	else
		document.getElementById("loadingDiv").innerHTML="<img src='images/loading.gif' width='20' height='20' style='padding-left:10px;'>";
}

function checkEmailExist(email)
{
	xmlHttp1=GetXmlHttpObject()
	if (xmlHttp1==null)
	{
	  alert ("Browser does not support HTTP Request")
	  return
	} 
	var url="checkEmailExist.php"
	url=url+"?email="+email;
	//alert(url);
	xmlHttp1.onreadystatechange=stateChanged2 
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
} 

function stateChanged2() 
{ 
	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
	{  
		string=xmlHttp1.responseText;
		document.getElementById("loadingDiv3").innerHTML='';
        document.getElementById("emailDiv").innerHTML=string;

		
	}
	else
		document.getElementById("loadingDiv3").innerHTML="<img src='images/loading.gif' width='20' height='20' style='padding-left:10px;'>";
}


function mailcode(email)
{
	xmlHttp1=GetXmlHttpObject()
	if (xmlHttp1==null)
	{
	  alert ("Browser does not support HTTP Request")
	  return
	} 
	var url="verifyemail.php"
	url=url+"?email="+email;
	//alert(url);
	xmlHttp1.onreadystatechange=stateChanged3 
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
} 

function stateChanged3() 
{ 
	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
	{  
		string=xmlHttp1.responseText;
		var val = string.split("|");
		//alert(val);
		document.getElementById("email_code").value=val;
		document.getElementById("loadingDiv3").innerHTML="<font color='#0070A6' size='1'>Verification Code Send On Your Email, Please Check it!!!</font>";
	}
	else
		document.getElementById("loadingDiv3").innerHTML="<img src='images/loading.gif' width='20' height='20' style='padding-left:10px;'>";
}
function GetXmlHttpObject()
{
	var xmlHttp1=null;
	try
	 {
	 // Firefox, Opera 8.0+, Safari
	 xmlHttp1=new XMLHttpRequest();
	 }
	catch (e)
	 {
	 // Internet Explorer
	 try
	  {
	  xmlHttp1=new ActiveXObject("Msxml2.XMLHTTP");
	  }
	catch (e)
	 {
	 xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	 }
	return xmlHttp1;
}

