function hideDivs(exempt) {
  if (!document.getElementsByTagName) return null;
  if (!exempt) exempt = "";
  var divs = new Array(2);
  divs[0] = "about";
  divs[1] = "press";
  for(var i=0; i < divs.length; i++) {
    var div = document.getElementById(divs[i]);
    var id = div.id;
    if (id != exempt) {
      div.style.display = "none";
    }
  }
}

function fixLinks() {
  if (!document.getElementsByTagName) return null;
  manipulateHref( document.getElementsByTagName("a") );
  manipulateHref( document.getElementsByTagName("area") );
}

function manipulateHref(anchors) {
  for(var i=0; i < anchors.length; i++) {
    var a = anchors[i];
    var href = a.href;
    if ((href.indexOf("#") != -1 )) {
      var index = href.indexOf("#") + 1;
      href = "javascript:show('" + href.substring(index) + "');";
      a.setAttribute("href",href);
    }
  }
}

function show(what) {
  if (!document.getElementById) return null;
  showWhat = document.getElementById(what);
  hideDivs(what);
  showWhat.style.display = "block";
}

window.onload = function() {
    hideDivs("about");
    fixLinks();
}
