function getHTTPObject()
{
        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
}

//netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
document.body.style.cursor='wait'
var http = getHTTPObject()

//change this to php script for ajax call with value needed to return

if(window.location.pathname=='/widgets/html/threat_level_prod.html')
{
    url='../threat_level.php?date='+Number(new Date());
}
else
{
  url='http://www.ok.gov/widgets/threat_level.php?date='+Number(new Date());
}

http.open("GET", url,false)
http.send(null)

if (http.readyState==4 || http.readyState=="complete")
{
  list=http.responseText
  document.write(list)
}
document.body.style.cursor='auto'

