


function onlineuser() 
{   

http.open("GET","online.php", true);

http.onreadystatechange = function()

 {//Call a function when the state changes.

	if(http.readyState == 4 && http.status == 200) 
	{
    var results=http.responseText; 
    document.getElementById("CURRENT_LOGIN_TIME").value=results;
	setTimeout(onlineuser,10000);
//	setTimeout(onlineuser,300000);  //1000 milli seconds = 1 seconds


//60 000 = 1 min
//30 0000 = 5 mins

	}
}
http.send(null);

SESSION_LOGOUT_TIME();
} 



function getHTTPObject() 
{ 

  var xmlhttp_obj; 

 if(window.XMLHttpRequest)
  { 
    xmlhttp_obj = new XMLHttpRequest(); 
  } 
  else if (window.ActiveXObject)
  { 
    xmlhttp_obj = new ActiveXObject("Microsoft.XMLHTTP"); 
    if (!xmlhttp_obj)
	{ 
        xmlhttp_obj=new ActiveXObject("Msxml2.XMLHTTP"); 
    } 
  } 
  return xmlhttp_obj;  
} 

var http = getHTTPObject(); // We create the HTTP Object 




//popup div continue button click
function contin()
{
var current_time=document.getElementById("CURRENT_LOGIN_TIME").value;

document.getElementById("CONTINUE_LOGIN_TIME").value=current_time;

document.getElementById("SESSION_ENDS").style.display='none';

document.getElementById("ALERT_SEESION_ENDS").value=0;
}


