var xmlhttp

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
//-----------username check-----------
function usercheck(str)
{
/*if (str.length==0)
{ 
document.getElementById("txtHint").innerHTML=""
return
}*/
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="inc/validate.php"
url=url+"?username="+str
xmlHttp.onreadystatechange=userchk
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function userchk() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
 if(xmlHttp.responseText!="")
   {
     document.getElementById("signupuserid").innerHTML=xmlHttp.responseText;
	 document.frmWeb.username.value="";
	 document.frmWeb.username.focus();
   }
   else
   {
	 document.getElementById("signupuserid").innerHTML=xmlHttp.responseText;
   }
}
}
//-----------username check-----------
function emailcheck(str)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="inc/validate.php"
url=url+"?email="+str
xmlHttp.onreadystatechange=emailchk
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function emailchk() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
 if(xmlHttp.responseText!="")
   {
     document.getElementById("signupemail").innerHTML=xmlHttp.responseText;
	 document.frmWeb.email.value="";
	 document.frmWeb.email.focus();
   }
   else
   {
	 document.getElementById("signupemail").innerHTML=xmlHttp.responseText;
   }
}
}
