/**
 * This piece of JavaScript opens links with the 
 * rel="external" attribute in a new window in a standards-
 * compliant way.
 */
function externalLinks() {
 // Check if we can access the DOM
 if (!document.getElementsByTagName) return;
 
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     // Make the link open in a new window
     anchor.target = "_blank";
 }
}

window.onload = externalLinks;
