var xmlhttp;
function loadXMLDoc(url)
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  xmlhttp.onreadystatechange=stateChange;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  xmlhttp.onreadystatechange=stateChange;
  xmlhttp.open("GET",url,true);
  xmlhttp.send();
  }
}

function stateChange()
{
if (xmlhttp.readyState<4)
  {
  document.getElementById('test').innerHTML='<img src="img/load.gif" />';
  }
else if (xmlhttp.readyState==4)
  {
  if (xmlhttp.status==200)
    {
    document.getElementById('test').innerHTML=xmlhttp.responseText;
    }
  else
    {
    alert("There was a problem in the returned data");
    }
  }
}
function loadXMLDoc2(url)
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  xmlhttp.onreadystatechange=stateChange2;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  xmlhttp.onreadystatechange=stateChange2;
  xmlhttp.open("GET",url,true);
  xmlhttp.send();
  }
}

function stateChange2()
{
if (xmlhttp.readyState<4)
{
document.getElementById('test2').innerHTML='<img src="img/load.gif" />';
}
else if (xmlhttp.readyState==4)
  {
  if (xmlhttp.status==200)
    {
    document.getElementById('test2').innerHTML=xmlhttp.responseText;
    }
  else
    {
    alert("There was a problem in the returned data");
    }
  }
}
