loadData();

var xmlHttp = false;
try {
    xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        xmlHttp  = false;
    }
}
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}

setInterval("loadData()",10000);
function loadData()
{
 if (xmlHttp) {
     xmlHttp.open('GET', '/chat/getChatOnlineUsers.php', true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
			if(xmlHttp.responseText!="0"){
				document.getElementById("asb2_content").innerHTML = "["+xmlHttp.responseText+"]";
			}else{
				document.getElementById("asb2_content").innerHTML = "";
			}
         }
     };
     xmlHttp.send(null);
 }
}