var http;

if (window.XMLHttpRequest) {
	http = new XMLHttpRequest();
}
else {
	http = new ActiveXObject("Microsoft.XMLHTTP");
}

function chkUser(felhasznalo) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkUser.php?nev=" + felhasznalo + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserName').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkEmail(email) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkEmail.php?email=" + email + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserEmail').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkEmail2(email,email2) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkEmail2.php?email=" + email + '&email2=' + email2 + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserEmail2').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkPassword(passw) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkPassword.php?password=" + passw + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserPassword').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkPassword2(passw,passw2) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkPassword2.php?password=" + passw + '&password2=' + passw2 + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserPassword2').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkName1(name1) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkForName.php?forname=" + name1 + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserForName').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkName2(name2) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkSecName.php?secname=" + name2 + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserSecName').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkCountry(country) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkCountry.php?country=" + country + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserCountry').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkPostal(postal) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkPostal.php?postal=" + postal + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserPostal').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
function chkTown(town) {
	var idopont = new Date().getTime();
	http.abort();
	http.open("GET", "script_chkTown.php?town=" + town + '&ido=' + idopont, true);
	http.onreadystatechange = function() {
								  if(http.readyState == 4) {
									document.getElementById('infoUserTown').innerHTML = http.responseText;
								  }
							  }
	http.send(null);
}
