var truemail="";

if (window.XMLHttpRequest){
          xmlhttp=new XMLHttpRequest();
}else{
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttp.onreadystatechange=function(){
    if (xmlhttp.readyState==4 && xmlhttp.status==200){
	truemail=xmlhttp.responseText;
    }

}

function onchg_func(s1){
	xmlhttp.open("GET","/truemail.php?email="+document.getElementById(s1).value,true);
	xmlhttp.send();
}

function onsub_func(s1){
	if (truemail != "" ){
document.getElementById(s1).value=truemail;
	}
}

