var xmlHttp2 = null;
function load2() {
	if (xmlHttp2 != null) { return false; }
	// ### Erschaffen eines XML-HTTP Objektes ###
	// Mozilla, Opera, Safari sowie Internet Explorer 7
	if (typeof XMLHttpRequest != 'undefined') {
	    xmlHttp2 = new XMLHttpRequest();
	}
	if (!xmlHttp2) {
	    // Internet Explorer 6 und aelter
	    try {
	        xmlHttp2  = new ActiveXObject("Msxml2.xmlHttp2");
	    } catch(e) {
	        try {
	            xmlHttp2  = new ActiveXObject("Microsoft.xmlHttp2");
	        } catch(e) {
	            xmlHttp2  = null;
	        }
	    }
	}
	
	return true;
}

function user_online_load() {
  var obj = document.getElementById("user_online");
  var txt = obj.innerHTML;
  var par = 'text=' + txt;
  var xml;

	xmlHttp2.open('POST', '/auvica_user_online.php', true);
	xmlHttp2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp2.setRequestHeader("Content-length", par.length);
	xmlHttp2.setRequestHeader("Connection", "close");
	
	xmlHttp2.onreadystatechange = function (aEvt) {
	  if (xmlHttp2.readyState == 4) {
	     if(xmlHttp2.status == 200) {
	      	if (xmlHttp2.responseText) {
	      		obj.innerHTML = xmlHttp2.responseText;
	      	}
	     }
	     //else
	     // alert("Error loading page\n");
	  }
	};
	
	// Anfragen absenden
	xmlHttp2.send(par); 
}

function user_online_start(){
  load2();
  user_online_load();
}

window.setTimeout("user_online_start()", 500);