function forgotpassword()
{
			var  email =  document.forgot_popupform.email.value ;
			
			if (document.forgot_popupform.email.value == '') 
			{
			alert('Please fill in your email');
			return false;
			}		
			document.getElementById("txtHint4").innerHTML="Validating E-Mail id......";
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {

		  if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
							var rs = xmlhttp.responseText;
							rs=rs.trim();
							//alert(rs);
							if(rs == '')
							{
								document.getElementById("txtHint4").innerHTML="Your E-Mail id is not valid......";
								//alert('Your E-Mail id is not valid......');
								return false;
							}
							if(Number(rs)>0)
							{
								document.getElementById("txtHint4").innerHTML="Creating New Password......";
								alert('Your New Password is sent to your E-Mail id.');
								document.getElementById('ibox_overlay').style.display='none';
								document.getElementById('ibox_wrapper').style.display='none';
								
							}
			}
  }
  var url ="forgotpassword.php?e="+email;
 // alert(url);
xmlhttp.open("GET",url,true);
xmlhttp.send();
}
