window.onload = runEm;

function runEm() {
	externalLinks();
}
/* all external links */
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";
 }
}

/*legacy open window script*/
function NewWindow(mypage, myname, w, h, scroll, resize) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+',toolbar=no,location=no,status=no,menubar=no,dependent=no';
    win = window.open(mypage, myname, winprops);
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
