
	
function ajax_checkSession(par) {
var xmlHttp;
try {
	// Firefox, Opera 8.0+, Safari
	xmlHttp=new XMLHttpRequest();
	}
catch (e) {
	// Internet Explorer
	try {
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		catch (e) {
			alert("Your browser does not support AJAX!");
			}
		}
	}
	if (document.form.captcha.value.length == 5) {
		xmlHttp.onreadystatechange=function() {
		    if(xmlHttp.readyState==4) {
				if (xmlHttp.responseText == 'ok') {
					document.form.captcha_chech.value='1';
					}
				else {
					document.form.captcha_chech.value='';
					alert('Hibás kód!');
					}
				}
		    }
		xmlHttp.open("GET","/check_session.php?code=" + par,true);
		xmlHttp.send(null);
		}
	else document.form.captcha_chech.value='';
	}