// An article about using the XHTML Target Module to allow the rel="external"
// However the extending of DTD with XHTML Target Module is badly implemented in most browsers
// http://www.zeldman.com/daily/0503a.shtml#strictlyspeaking
// http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/dtd_module_defs.html#a_module_Target

// Another article showing another technique to mark up then dynamically add the target attribute after the page has loaded
// http://www.sitepoint.com/article/standards-compliant-world
function targetBlank() {
 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.getAttribute("rel") == "download"))
	   anchor.target="_blank";
 }

}
window.onload = targetBlank;