function enkat_login(id)
{
	if(document.getElementById('enkat_' + id).style.display == 'block')	     
	{
		document.getElementById('enkat_' + id).style.display = 'none';	
	}
	else
	{
		document.getElementById('enkat_' + id).style.display = 'block';	    
	}
}


function setFocus(id)
{
	document.getElementById(id).focus();
}

function createRequestObject()
{
	var ajaxRequest; 
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	return ajaxRequest; 
} 

var http = createRequestObject();

var div = '';

function getAjax(url,id)
{
	http.open('get', url);
	div=id;
	http.onreadystatechange = handleAjax; 
	
	http.send(null);
}

function handleAjax()
{
	if(http.readyState == 4 && http.status == 200){ 
		var response = http.responseText;
		document.getElementById(div).innerHTML = response;
	}
}

function start_online()
{
	setTimeout("getAjax('include/online_fix.php', 'online_fix')", 1120);
	setTimeout("start_online()", 15000);
}