function getHTTPObject(){
	if (window.ActiveXObject) {
		var httpObject = null;
		try {
			httpObject = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch (e) {
			try {
				httpObject = new ActiveXObject("Msxml2.XMLHTTP");				
			} 
			catch (E) {
				httpObject = null;
			}
		}
		if (httpObject==null) 
			alert('microsoft null');
		return httpObject;
	}
	else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	}
	else {
		alert("A böngészője nem támogatja az AJAX kapcsolatot.");
		return null;
	}
};

function loginsTabla(){
	if( typeof( window.innerWidth ) == 'number' ) {
  		//Nem IE
   	pWidth = window.innerWidth;
   	pHeight = window.innerHeight;
	} 
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    	//IE 6+ in 'standards compliant mode'
    	pWidth = document.documentElement.clientWidth;
    	pHeight = document.documentElement.clientHeight;
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	//IE 4 compatible
    	pWidth = document.body.clientWidth;
    	pHeight = document.body.clientHeight;
	}
	var scr = pWidth +' x '+pHeight;
	var res = screen.width+' x '+screen.height;
	
	var url = "reg/setlogins.php?scr=" + encodeURI(scr)+"&res=" + encodeURI(res);
	var httpObject = getHTTPObject();
	if (httpObject != null) { 
		httpObject.onreadystatechange = function setOutput() {
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {    
				  if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
				  	alert(httpObject.responseText);
				  }
//			      else if (httpObject.responseText != 'OK' && httpObject.responseText != '') {			       
//						alert(httpObject.responseText);
//			      }		        
				}
			}
		};
		httpObject.open("GET", url, true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};

