function getOnlineUserCount()
{
		xmlHttp=GetXmlHttpObject();

if (xmlHttp==null)
  {
  alert ("Tarayici AJAX Desteklemiyor!");
  return;
  } 
	var url= 'userOnline.php';
	var sc = 'x=0';

	xmlHttp.open("POST",url,true);
	//xmlHttp.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT');
    xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
    xmlHttp.setRequestHeader('Content-length', sc.length);
    xmlHttp.setRequestHeader('Connection', 'close');
	
	xmlHttp.onreadystatechange=function()
	{		
			if (xmlHttp.readyState==4)
			{ 
			document.getElementById("sayi").innerHTML=xmlHttp.responseText;
			}
	};
	
	xmlHttp.send(sc);
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

//var text = document.getElementById('sayi').innerHTML;
// var re = /(\d{1,5})/;
// var text2 = text.match(re);
//var text3 = text.toLowerCase();
//var text3 = text3.split('<\/script>');
//document.getElementById('sayi').innerHTML = parseInt(text3[1])+500;

document.getElementById('sayi').style.visibility = 'visible';

getOnlineUserCount();