// 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;
   }
}   

// Change the value of the outputText field
function setOutput(){
   if(httpObject.readyState == 4){
      document.getElementById('myBody').innerHTML = httpObject.responseText;
   }
}

// Implement business logic
function loadSite(){
   httpObject = getHTTPObject();
   if (httpObject != null) {
      httpObject.open("GET", "content.php", true);
      httpObject.send(null);
      httpObject.onreadystatechange = setOutput;
   }
}
 
var httpObject = null;
// Change the value of the outputText field
function setOutput2(){
   if(httpObject2.readyState == 4){
      document.getElementById('myBody2').innerHTML = httpObject2.responseText;
   }
}

// Implement business logic
function loadSite2(){
   httpObject2 = getHTTPObject();
   if (httpObject2 != null) {
	  var qst = window.location.search.substring(1);	   
	  
      httpObject2.open("GET", "content2.php?"+qst+"", true);
      httpObject2.send(null);
      httpObject2.onreadystatechange = setOutput2;
   }
}
 
var httpObject2 = null;
// Change the value of the outputText field
function setOutput3(){
   if(httpObject3.readyState == 4){
      document.getElementById('myBody3').innerHTML = httpObject3.responseText;
   }
}

// Implement business logic
function loadSite3(){
   httpObject3 = getHTTPObject();
   if (httpObject3 != null) {
	  var qst = window.location.search.substring(1);	   
	  
      httpObject3.open("GET", "content3.php?"+qst+"", true);
      httpObject3.send(null);
      httpObject3.onreadystatechange = setOutput3;
   }
}
 
var httpObject3 = null;

