var xmlHttp

function GetPassword()
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }


if (document.passform.firstname.value == '') {
alert ("Please enter your first name.")
document.passform.firstname.focus();
return;
} else {
var firstname = document.passform.firstname.value;
}

if (document.passform.surname.value == '') {
alert ("Please enter your surname.")
document.passform.surname.focus();
return;
} else {
var surname = document.passform.surname.value;
}



if (document.passform.email.value == '') {
alert ("Please enter your resgistered email address.")
document.passform.email.focus();
return;
} else {
var email = document.passform.email.value;
}




var url="ajax/getpassword.php"
url=url+"?email="+email
url=url+"&firstname="+firstname
url=url+"&surname="+surname
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {

 var userwarning = xmlHttp.responseText



document.passform.email.value = '';
document.passform.firstname.value = '';
document.passform.surname.value = '';

 if (userwarning == "ok")
 	{

	document.getElementById('notifydiv').style.display = "block";

	} else {

	alert("Sorry, the details you have provided could not be verified.");

	}

 }
}

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;
}