
// Used for pages with strict doctypes (i.e. no target="_blank")
// Automagically adds them back in to links with rel="external"

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";
    }

  
    if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "news-item") {
         anchors[i].onkeypress = function(){ window.open(this.href, 'NewsItem', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
         anchors[i].onclick = function(){window.open(this.href , 'NewsItem', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
    }
    
    
  
    

    if (anchor.getAttribute("href") && anchor.getAttribute ("rel") == "charthelp") {
         anchor.onkeypress = function(){window.open('http://online.hemscottir.com/helppages/gifgraphs.htm ', 'ChartHelp', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
         anchor.onclick = function(){window.open(' http://online.hemscottir.com/helppages/gifgraphs.htm', 'ChartHelp', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
         anchor.setAttribute ("href","#");
    }


 if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "termofuse") {
         anchors[i].onkeypress = function(){ window.open(this.href, 'Terms Of use', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=505,width=638,left=100,top=100');return false;}
         anchors[i].onclick = function(){window.open(this.href , 'Term Of use', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=505,width=638,left=100,top=100');return false;}
    }

   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "disclaimer") {
      var disclaimerURL = anchor.getAttribute('href');
      anchor.onkeypress = function(){window.open('http://online.hemscottir.com/legal/cust_disclaim.htm', 'CtrlWindow', 'toolbar=no,menubar=no,height=505px,width=638px,location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');return false;}
      anchor.setAttribute("href","#");
      anchor.onclick = function(){window.open('http://online.hemscottir.com/legal/cust_disclaim.htm', 'CtrlWindow', 'toolbar=no,menubar=no,height=505px,width=638px,location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');return false;}
      anchor.setAttribute("href","#");
      }


}

}

window.onload = externalLinks;

