//functions for polling the aspx session to keep it alive if the user spends extended time in the asp space.
window.setInterval("loadXMLDocCurrentSessionStats('/CurrentSessionStats.ashx?timeseed='+ Math.random())", 60000);

var xmlhttp;
function loadXMLDocCurrentSessionStats(url)
{
xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=state_ChangeCurrentSessionStats;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {
  alert("Because of the web browser you are using, you are likely to experience problems using the AMIRA International website. Please try using a different web browser.");
  }
}

function state_ChangeCurrentSessionStats()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"
    document.getElementById('aspxsession').innerHTML=xmlhttp.responseText;
    }
  else
    {
    alert("Sorry, there is a problem retrieving data from the AMIRA International website. Please check your internet connection." + xmlhttp.statusText);
    }
  }
}



