var d = document;

function externalAnchors()
{
  if (d.getElementsByTagName)
  {
    var anchors = d.getElementsByTagName("a");

    for (var i = 0; i < anchors.length; i++)
    {
      if (anchors[i].getAttribute("href") && anchors[i].getAttribute("rel") == "external")
      {
        anchors[i].target = "_blank";
      }
    }
  }
}

function startList()
{
  if (d.all && d.getElementById)
  {
    navRoot = d.getElementById("nav");
    for (i = 0; i < navRoot.childNodes.length; i++)
    {
      node = navRoot.childNodes[i];
      if (node.nodeName == "LI")
      {
        node.onmouseover = function()
        {
          this.className += " over";
          this.style.zIndex = 450;
        }
        node.onmouseout = function()
        {
          this.className = this.className.replace(" over", "");
          this.style.zIndex = 0;
        }
      }
    }
  }
}

window.onload = function ()
{
  externalAnchors();
  startList();
}
