// JavaScript Document

// This script pops up all external links in a new window.
function popLinks(){
  var serverone = document.location.hostname;
  // Enter an additional domain that you *don't* want in new windows here 
  var servertwo = " ";
  
  if (!document.getElementsByTagName) return null;
  var anchors = document.getElementsByTagName("a");
  for(var i=0; i < anchors.length; i++){
    var a = anchors[i];
    var href = a.href;
    if ((href.indexOf("http") != -1) && (href.indexOf(serverone) == -1) && (href.indexOf(servertwo) == -1)) { 
	  a.setAttribute("title","This link will open in a new window.");  
	  
	  // Change the width/height of the popup window below, if you wish
	  a.onclick = function() { window.open(this.getAttribute('href'), "popUp", "toolbar,location,resizable,scrollbars,width=500,height=400"); return false; }
    }
  }
}
window.onload = function(){
  popLinks();
}