var xmlHttp

// USER ID CHECKING /////////////////////////////////////////

function showUser(str)

{ 

	xmlHttp=GetXmlHttpObject();

	if (xmlHttp==null)

 	{

 		alert ("Browser does not support HTTP Request");

 		return;

 	}

	

	var url="chk_user.php?sid=" + Math.random() + "&user=" + str 

	xmlHttp.onreadystatechange=userChanged;

	xmlHttp.open("GET", url , true)

	xmlHttp.send(null)

} 

function userChanged() 

{ 

	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 

		window.document.getElementById("c").innerHTML=xmlHttp.responseText 

	} 

} 



// Email CHECKING /////////////////////////////////////////////////

function showEmail(str)

{ 

	xmlHttp=GetXmlHttpObject();

	if (xmlHttp==null)

 	{

 		alert ("Browser does not support HTTP Request");

 		return;

 	}

	

	var url="chk_email.php";

	url=url+"?email="+str;

	url=url+"&sid="+Math.random();

	xmlHttp.onreadystatechange=emailChanged;

	xmlHttp.open("GET", url , true)

	xmlHttp.send(null)

} 

function emailChanged() 

{ 

	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 

		window.document.getElementById("e").innerHTML=xmlHttp.responseText 

	} 

} 



// Email CHECKING Forgot Password //////////////////////////////////////////////////////

var xmlHttp

function showEmailForgot(str)

{ 

	xmlHttp=GetXmlHttpObject();

	if (xmlHttp==null)

 	{

 		alert ("Browser does not support HTTP Request");

 		return;

 	}

	

	var url="forgot_email_check.php?email=" + Math.random() + "&email=" + str 

	xmlHttp.onreadystatechange=emailChangedForgot;

	xmlHttp.open("GET", url , true)

	xmlHttp.send(null)

	window.document.getElementById("forgot_dob").innerHTML="<a href='forgot_password_email.php?email="+str+"'>Click Here If Forgot</a>"; 

} 



function emailChangedForgot() 

{ 

	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 

		window.document.getElementById("c").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;

}