function SayHiToGoogle()
{
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-23601003-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}
function getXMLHttp()
{
  var xmlHttp

  try
  {
    //Firefox, Opera 8.0+, Safari
    xmlHttp = new XMLHttpRequest();
  }
  catch(e)
  {
    //Internet Explorer
    try
    {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e)
    {
      try
      {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch(e)
      {
        alert("Your browser does not support AJAX!")
        return false;
      }
    }
  }
  return xmlHttp;
}

function RequestHome()
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      //SayHiToGoogle();
      _gaq.push(['_trackEvent', 'Navigate', 'Home']);
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", "home.php", true); 
  xmlHttp.send(null);
}
function RequestAbout()
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      //SayHiToGoogle();
      _gaq.push(['_trackEvent', 'Navigate', 'About']);
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", "about.php", true); 
  xmlHttp.send(null);
}
function RequestRates()
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      //SayHiToGoogle();
      _gaq.push(['_trackEvent', 'Navigate', 'Rates']);
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", "rates.php", true); 
  xmlHttp.send(null);
}
function RequestPolicies()
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      //SayHiToGoogle();
      _gaq.push(['_trackEvent', 'Navigate', 'Policies']);
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", "policies.php", true); 
  xmlHttp.send(null);
}
function RequestContact()
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      //SayHiToGoogle();
      _gaq.push(['_trackEvent', 'Navigate', 'ContactUs']);
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", "contact.php", true); 
  xmlHttp.send(null);
}
function RequestCottages()
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      //SayHiToGoogle();
      _gaq.push(['_trackEvent', 'Navigate', 'Cottages']);
      HandleResponse(xmlHttp.responseText);
    }
  }

  xmlHttp.open("GET", "cottages.php", true); 
  xmlHttp.send(null);
}

function HandleResponse(response)
{
  document.getElementById('main_content').innerHTML = response;
}

