function passreqmy()
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	alert("Browser does not support HTTP Request");
	return
	} 
	if(document.form_forgotmy.funamemy.value=="")
	{
	alert("Please enter Your Email");
	document.form_forgotmy.funamemy.focus();
	return false;
	}
	var re = /^[_\.0-9a-z-]+\@([0-9a-z][0-9a-z-]*\.)+([a-z]{2,4})+$/i
	if (!document.getElementById('funamemy').value.match(re)) 
	{
	alert('Please enter a valid Email ID');
	document.form_forgotmy.funamemy.value="";
	document.form_forgotmy.funamemy.focus();
	return false;
	}	
	funame =document.getElementById('funamemy').value;
	var purl;
	purl="forgot.php?act=mypass&funame="+funame;
    //alert(purl);
	xmlHttp.onreadystatechange=stateChangemy 
	xmlHttp.open("GET",purl,true)
	xmlHttp.send(null)
} 

function stateChangemy() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{   
	   //alert(xmlHttp.responseText);
		if(xmlHttp.responseText == 1)
		 {
			document.getElementById("passreqmy").style.display="none";
			document.getElementById("forgetmy").style.display="none";
			document.getElementById("showmy").style.display="block";
			document.getElementById("showmy").innerHTML= "<font color='#638637'>Your password has been sent to your email address!</font>";
		 }else{
			document.getElementById("passreqmy").style.display="block";
			document.getElementById("funamemy").value = "";
			document.getElementById("forgetmy").style.display="none";
			document.getElementById("showmy").style.display="block";
			document.getElementById("showmy").innerHTML= "<font color='#8F1616'>You have given Invalid mail address</font>";
		 }
	        
	}
	if (xmlHttp.readyState==1)
	{ 
			//document.getElementById("showmy").innerHTML="<center><img src='images/ajax-star.gif'></center>";
	} 
} 
