// Get the HTTP Object
function getHTTPObject(){
   if (window.ActiveXObject) 
       return new ActiveXObject("Microsoft.XMLHTTP");
   else if (window.XMLHttpRequest) 
       return new XMLHttpRequest();
   else {
      alert("Your browser does not support AJAX.");
      return null;
   }
}

//	Make the HTTP request
function MakeRequest( requestURL )
{
  var xmlHttp = getHTTPObject();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", requestURL, true); 
  xmlHttp.send(null);
}

function HandleResponse(response)
{
	if ( response )
		alert (response);
}

//	Make the HTTP request
function MakeRequestOnDiv( requestURL, theDiv )
{
  var xmlHttp = getHTTPObject();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      theDiv.innerHTML=xmlHttp.responseText;
    }
  }

  xmlHttp.open("GET", requestURL, true); 
  xmlHttp.send(null);
}

