function calc_left (w) {
   var left = (screen.availWidth / 2) - (w / 2);
   return (left);
}

function calc_top (h) {
   var top = (screen.availHeight / 2) - (h / 2);
   return (top);
}

function open_popup (url, w, h) {
   var top = calc_top (h);
   var left = calc_left (w);

   popup = window.open (url,'','scrollbars=yes,width='+w+',height='+h+',left='+left+',top='+top+',screenX='+left+',screenY='+top);
   popup.focus();
}

function copyright () {
   var w = 550;
   var h = 310;
   var url = "copyright.htm";
   open_popup(url,w,h);
}

function no_spam (user,domain) {
  locationstring = "mailto:" + user + "@" + domain;
  window.location = locationstring;
}

function adjustSidebarHeight() {
   if (document.layers) {
      return true;
   }
   else if (document.getElementById) {
      var contents = document.getElementById('contents');
      var sidebar = document.getElementById('sidebar');
      var intro = document.getElementById('page_title');
      var introheight = 0;
      if (intro) { introheight = intro.offsetHeight; }
      if (sidebar) { sidebar.style.height = contents.offsetHeight + introheight + 'px'; }
      return true;
   }
}
window.onload = adjustSidebarHeight;
