var xmlhttp;
function forgotpass()
{
xmlhttp=GetXmlHttpObject();

if (xmlhttp==null)
{
alert ("Your browser does not support XMLHTTP!");
return;
}
var email = document.forgotpassform.email.value;
var url = dynlink+"/forgot-password.php";
var parameters = "email="+email;
xmlhttp.open("POST", url, true);

//Send the proper header information along with the request
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", parameters.length);
xmlhttp.setRequestHeader("Connection", "close");

xmlhttp.onreadystatechange = function() {//Handler function for call back on state change.
	if(xmlhttp.readyState == 4) {
		if(xmlhttp.responseText == "success")
		{
			alert("Your password emailed to your email address. Please check you email !!");
			window.parent.location=dynlink+"/index.php";
		}
		else
		{
			document.getElementById("error").innerHTML=xmlhttp.responseText;
		}
	}
}
xmlhttp.send(parameters);

return false;
}

