var httpRequest;

function createRequestObject_2() {
   var ro;
   if (window.XMLHttpRequest) {
      ro = new XMLHttpRequest();
   } else {
      if (window.ActiveXObject) {
         ro = new ActiveXObject("Microsoft.XMLHTTP");
      }
   }
   return ro;
}

/*
function checkReadyState() {
   if(httpRequest.readyState < 4) {
      AdvSearchAJAX.msgBox.style.display = "block";
   } else if(httpRequest.readyState == 4) {
      AdvSearchAJAX.msgBox.style.display = "none";
      return (httpRequest.status == 200);
   }
}
*/

var AJAX_page_to_go = {
    /*== Method for getting Estate & Building Details ==*/
   
   setSESSION: function(UrlToGo) {
      if(UrlToGo !="") {
         httpRequest = createRequestObject_2();
         var aParams = new Array();
         var sParam = encodeURIComponent("UrlToGo");
         sParam += "=";
         sParam += encodeURIComponent(UrlToGo);
         aParams.push(sParam);

         sBody = aParams.join("&");
         url = "ajax_page_to_go.php";
         httpRequest.open("POST", url, true);
         httpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
         httpRequest.send(sBody);
      }
   }
};
/*== END CLASS AdvSearchAJAX ==*/
