var xmlHttp

function getTraficInfo()
 {
 
 xmlHttp=GetXmlHttpObject()
 if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  }
 var url="xml.php"
 url=url+"?nr="+Math.random()
 xmlHttp.onreadystatechange=stateChanged
 xmlHttp.open("GET",url,true)
 xmlHttp.send(null)
 }

function stateChanged()
{

/*
  if (xmlHttp.readyState==4) {
   if (xmlHttp.status==200) alert("URL Exists!")
    else if (xmlHttp.status==404) alert("URL doesn't exist!")
     else alert("Status is "+xmlHttp.status)
  }
*/
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
 xmlDoc=xmlHttp.responseXML;
 document.getElementById("tjam").innerHTML= xmlDoc.getElementsByTagName("tjam")[0].childNodes[0].nodeValue;
 document.getElementById("tobj").innerHTML= xmlDoc.getElementsByTagName("tobj")[0].childNodes[0].nodeValue;
 document.getElementById("tcond").innerHTML= xmlDoc.getElementsByTagName("tcond")[0].childNodes[0].nodeValue;


 }
}

function GetXmlHttpObject()
 {
 var objXMLHttp=null
 if (window.XMLHttpRequest)
  {
  objXMLHttp=new XMLHttpRequest()
  }
 else if (window.ActiveXObject)
  {
  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
 return objXMLHttp
 }
