
var xmlhttp2;
function getXMLcall() 
{  
  if (window.XMLHttpRequest) 
  {
    xmlhttp2 = new XMLHttpRequest();
  } 
  else if(window.ActiveXObject) 
  {
    xmlhttp2 = new ActiveXObject("MSXML2.XMLHTTP");
  }	
}



function call_Agents()
{ 
  getXMLcall()
  var postURL = "getAgents.php";
  postURL =postURL+"?action=getcontent";
  postURL=postURL+"&sid="+Math.random()

   xmlhttp2.onreadystatechange=updateAgentDiv 
   xmlhttp2.open("GET",postURL,true)
   xmlhttp2.send(null)

}


function updateAgentDiv() 
{
	
  if (xmlhttp2.readyState==4)
   {
	   
  	var x = xmlhttp2.responseText
	document.getElementById('loadagent').innerHTML = x;
   }
  else{
  	document.getElementById('loadagent').innerHTML="Loading..."
  }
}
