/**
 * This script parses an HTML page, looking for links with <A href="" rel="external"> and adds target="_blank" to them.
 * We do this because target="_blank" is no longer allowable in HTML Strict, so we have Javascript insert it 
 *
 * Read the JavaScript tutorial to see why this is acceptable at:
 *   http://www.sitepoint.com/article/standards-compliant-world
 */

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;