//
// External linking in XHTML 1.0 Strict where
// target="_blank" as atribute for <a> is not allowed
//
// Define atribute var="external" instead of target="_blank"
// for each link that should open in a new window.
// Also define <body onload="externalLinks();">
//
// Solution suggested by Sitepoint.com
// http://www.sitepoint.com/article/standards-compliant-world
// Adapted by Daleth Web Productions
// http://www.daletweb.net/
//

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";
 }
}
