// JavaScript Document

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("rel")!=null)||(anchor.getAttribute("rel"))){
	   if (anchor.getAttribute("href") && anchor.getAttribute("rel").indexOf("external") != -1)  
		 anchor.target = "_blank";
	}   	
   
 }
 
 var areas = document.getElementsByTagName("area");
 for (var i=0; i<areas.length; i++) {
   var area = areas[i];
   
	if ((area.getAttribute("class")!=null)||(area.getAttribute("class"))){
	   if (area.getAttribute("class").indexOf("external") != -1)  
		 area.target = "_blank";
	}   	
   
 } 
 
}

function openwin(url, name, options) {
      var win = window.open(url, name, options);
}

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

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


if (window.addEventListener) {
	window.addEventListener("load", externalLinks, false)
} else if (window.attachEvent) {
	window.attachEvent("onload", externalLinks)
} else if (document.getElementById) {
	window.onload=externalLinks;
}

