var strURL = '';

function getpage(url) {

  strURL = url;
   
  // fade out
  //$("#content").fadeOut(300);
  
  // now load the content
  setTimeout("loadcontent()", 800);

  // fade in
  //$("#content").fadeIn(1200);
  
}

function loadcontent() {
  
  var xmlHttpReq = false;
  var self = this;

  // Mozilla/Safari
  if (window.XMLHttpRequest) {
    self.xmlHttpReq = new XMLHttpRequest();
  }

  // IE
  else if (window.ActiveXObject) {
    self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
  }
  
  // check to see if any parameters were passed
  if (strURL.indexOf('ajax') < 0) {
    if (strURL.indexOf('?')) {
      strURL += '&ajax=true';
    } else {
      strURL += '?ajax=true';
    }
  }

  self.xmlHttpReq.open('GET', strURL, true);
  self.xmlHttpReq.onreadystatechange = function() {

    if (self.xmlHttpReq.readyState == 4) {
      updatepage(self.xmlHttpReq.responseText);
    }
  }
  
  self.xmlHttpReq.send('');

}

function updatepage(str){
  document.getElementById('content').innerHTML = str;
}
