function hideDivs(exempt)
{
  if (!document.getElementsByTagName) {
    return null;
  }
  if (!exempt) exempt = "";
  var divs =
    document.getElementsByTagName("div");
  for(var i=0; i < divs.length; i++)
  {
    var div = divs[i];
    var id = div.id;
    if ((id != "page") &&
        (id != "content") &&
	(id != "nav") &&
	(id != "yearnav") &&
        (id != exempt))
    {
      div.style.display = "none";
    }
  }
}

window.onload = function()
{
  hideDivs("2010"); // The default year to display
}


function fixLinks()
{
  if (!document.getElementsByTagName) {
    return null;
  }
  var anchors =
    document.getElementsByTagName("a");
  for(var i=0; i < anchors.length; i++)
  {
    var a = anchors[i];
    var href = a.href;
    if ((href.indexOf("#") != -1) &&
        (href.indexOf("header") == -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);
  showWhat.style.display = "block";
  hideDivs(what);
}

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

  hideDivs(what);
}

