function externalLinks() { 
 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") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;

// JavaScript Document
// Resolves issue of '_target' depreciation in XHTML 1.0 strict. Script allows an external link to be opened in a new window under XHTML 1.0 Strict.
// Uses a custom value for the rel attribute to mark links leading to other Websites. These are the very same links that we want to open in a new browser window. 
// For these links, we set the rel attribute to external.
// Notice the last line, which assigns the externalLinks function to the window's onload event handler. This triggers the function when the document has finished loading.