function ajaxCheck()
{
   var xmlHttp;

   try
   {
      xmlHttp=new XMLHttpRequest();    
   }
   catch (e)
   {
     try
     {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
     }
     catch (e)
     {
         try
         {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e)
         {        
            alert("Your browser does not support AJAX. Please ensure you have the latest version of your browser and have JavaScript enabled.");
            return false;
         }
      }
   }
    
   return xmlHttp;
}

function ajaxInitiate(divDestination)
{
   var xmlHttp = ajaxCheck();

   xmlHttp.onreadystatechange=function()
   {
      if(xmlHttp.readyState==4)
      {
         //Server responded.
         document.getElementById(divDestination).innerHTML = xmlHttp.responseText;
      }
   } 

   return xmlHttp;
}


function ajaxLoadPage(page)
{
   var xmlHttp = ajaxInitiate("divContent");

   xmlHttp.open("GET", page, true);
   xmlHttp.send(null);
}

function ajaxLoadRSS(rss_feed)
{
   var xmlHttp = ajaxInitiate("divNewsFeed");

   xmlHttp.open("GET", rss_feed, true);
   xmlHttp.send(null);
}