var XMLHttpRequestObject1 = getXMLHttpRequestObject();
var XMLHttpRequestObject2 = getXMLHttpRequestObject();

function getXMLHttpRequestObject()
{
  try{
    return new XMLHttpRequest();
  }
  catch(e){
    try{
      return new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e){
      return false;
    }
  }
}

function startGETRequest1(url)
{
  if(XMLHttpRequestObject1){
    XMLHttpRequestObject1.open("GET", url);
    XMLHttpRequestObject1.onreadystatechange = function()
    {
      if (XMLHttpRequestObject1.readyState == 4){
        if(XMLHttpRequestObject1.status == 200){
          var responseXML = XMLHttpRequestObject1.responseXML;
          var responseText = XMLHttpRequestObject1.responseText;
          requestCompleted1(responseText, responseXML);
        }
        requestEnd();
      }
    }
    XMLHttpRequestObject1.send(null);
  }
}

function startGETRequest2(url)
{
  if(XMLHttpRequestObject2){
    XMLHttpRequestObject2.open("GET", url);
    XMLHttpRequestObject2.onreadystatechange = function()
    {
      if (XMLHttpRequestObject2.readyState == 4){
        if(XMLHttpRequestObject2.status == 200){
          var responseXML = XMLHttpRequestObject2.responseXML;
          var responseText = XMLHttpRequestObject2.responseText;
          requestCompleted2(responseText, responseXML);
        }
        requestEnd();
      }
    }
    XMLHttpRequestObject2.send(null);
  }
}
