var xhttpRequest; 

function GetXMLHttpRequestFactory()
{
  try
  { 
      return ( new ActiveXObject("Msxml2.XMLHTTP2") ) ;  
  } catch (e) {} 
  try 
  { 
    return ( new ActiveXObject("Microsoft.XMLHTTP") ) ;  
  } 
   catch (e) {} 

  try
  {
    return (new XMLHttpRequest()); 
  } catch (e) {} 
  alert(" Your browser does not have XML Http Capability. Get IE, Firefox , Opera."); 
  return (null); 
}

function callServerMethod()
{
    xhttpRequest = GetXMLHttpRequestFactory();  
    if (xhttpRequest == null ) return ; 
    xhttpRequest.open("GET" , "/inc/livechat.php?t=" , true ); 
    xhttpRequest.onreadystatechange = processResponse ; 
    xhttpRequest.send(null);
    return ; 
}

function processResponse()
{
      if (xhttpRequest == null ) return ; 
      if (xhttpRequest.readyState != 4 ) return ; // not gonna worry about error handling at this time .
      var responseText = xhttpRequest.responseText ;  
      if (responseText==1){
		document.getElementById("livechat").style.display="inline";
	  }

      xhttpRequest = null ; 
      return ; 
}


window.onload = callServerMethod;