/**
 * This function go through all anchors in a page and adds the attribute:
 * 'target="_blank"' when the attribute rel="external" is found in the 
 * anchor <a> element.  
 * 
 * Note: This function is a workaround to allow the use of the attribute 
 * 'target' in strict XHTML pages.  
 *
 * @author JPI 
 */
function convertLinksToExternalLinks() 
 { 
  if (document.getElementsByTagName) 
   {  
    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"; 
     }
   } 
 } 

