//<script type="text/javascript">//<!-- ajax for main window content -->
var time_variable;
 
function getXMLObject()  //XML OBJECT
{
   var xmlHttp = false;
   try {
     xmlHttp = new ActiveXObject("Msxml2.XMLHTTP")  // For Old Microsoft Browsers
   }
   catch (e) {
     try {
       xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")  // For Microsoft IE 6.0+
     }
     catch (e2) {
       xmlHttp = false   // No Browser accepts the XMLHTTP Object then false
     }
   }
   if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
     xmlHttp = new XMLHttpRequest();        //For Mozilla, Opera Browsers
   }
   return xmlHttp;  // Mandatory Statement returning the ajax object created
}
 
var xmlhttp = new getXMLObject();	//xmlhttp holds the ajax object

function ajaxFunction(place) {
  var getdate = new Date();  //Used to prevent caching during ajax call
  if(xmlhttp) { 
    xmlhttp.open("GET", place , true); 
    xmlhttp.onreadystatechange  = handleServerResponse;
        xmlhttp.send(); 
        _gaq.push(['_trackPageview', "/" + place]);//google analytics
  }
}
 
function handleServerResponse() {
   if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {
       document.getElementById("mainWindow").innerHTML=xmlhttp.responseText; //Update the div 
       window.scrollTo(0,0); //scrolls back to top of page

     }
     else {
        //alert("Error during AJAX call. Please try again");
        alert('status is: ' + xmlhttp.status);
     }
   }
}
//</script>//<!-- ajax for main window content -->
