function externalLinks()
{
  var anchor;
  var anchors;
  var i = 0;

  //Make sure that the function exists in this implementation
  if (!document.getElementsByTagName){
    return;
  }

  anchors = document.getElementsByTagName("a");

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

function loadDefaults()
{
  externalLinks()
}

window.onload = loadDefaults;
