/*******************************************************************************
** PROBLEM:  html will not validate when using target="_blank" in 
** links under the strict DTD because "target=" is not valid strict html.
**
** SOLUTION:  
**
** Link to this file in the <head> section like so:
** 
** <script src='external_link.js' type='text/javascript' charset='utf-8'>*</script>
**
** ...then use rel="external" in the <a... to open links in new windows 
**
*********************************************************************************/


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;