/*
    targets.js
    © 2007 - 2009 Gerald Davenport
    gvdavenports@inbox.com
    
    - - - - - - - - - - - - - - - - - - - - - - - - -
    
    designed to help with targetting links to new pages
      since xhtml 1.1 does not allow the target="_blank"
      tag anymore
    
    - - - - - - - - - - - - - - - - - - - - - - - - -
    
    BASIC TARGETS USED HERE:
    replace     use inside the rel=""
    _blank      blank
    _self         self
    _parent    parent
*/

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") == "contentFrame")
       anchor.target = "contentFrame";
   else if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "blank")
       anchor.target = "_blank";
   else if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "parent")
       anchor.target = "_parent";
  else if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "self")
       anchor.target = "_self";
  else if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "iframe")
       anchor.target = "iframe";
  else if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "ss")
       anchor.target = "showFrame";
 }
}
window.onload = externalLinks;

/*  March 9, 2008
    Time change early this year
*/