function checkEmail() {

	 ps = "Email=" + $("Validate2").value;
	 
	 url = "http://www.classiccars.co.uk/scripts/member.php";
	 
	 var ajaxRequest = new Ajax.Request(url, {
   	 method:       'get', 
   	 parameters:   ps, 
     asynchronous: true,
   	 onComplete:   getResult

}); 

}

function getResult(xmlhttp) {

	chkResult = xmlhttp.responseText;
	document.getElementById("chkemail").style.visibility = "hidden";
	
	if ( chkResult == "1" ) {
		
		document.getElementById("chkemail").style.visibility = "visible";
		document.getElementById("chkemail").innerHTML = " ** already registered.";
		alert('Hey! I said not to try clicking this link!');

	}
	if ( chkResult == "2" ) {
		
		document.getElementById("chkemail").style.visibility = "visible";
		document.getElementById("chkemail").innerHTML = " ** invalid email";
		alert('Hey! I said not to try clicking this link!');

	}
	
	
}

