// JavaScript Document
var xmlHttp

function checkmail()
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  var url="buscheckemail.jsp";
 
url=url+"?val="+document.ypreg.email.value;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);

}

function stateChanged() 
{

//document.getElementById("loader").style.display = "block";
if (xmlHttp.readyState==4)
{ 

document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
//alert(document.getElementById("txtHint").innerHTML);
//document.getElementById("usr").style.display = "none";
//document.getElementById("txtHint").style.display = "block";
}
}

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;
}