function addEventHandlers() {
  var images = document.getElementById('nav').getElementsByTagName('img');
  for (var i=0; i<images.length; i++) {
    if (images[i].src.indexOf('selected') == -1) {
      images[i].onmouseover = mouseGoesOver;
      images[i].onmouseout = mouseGoesOut;
    }
  }
}  

function mouseGoesOver() {
  this.src = this.src.substring(0,this.src.lastIndexOf('.')) + "_over.gif";
}

function mouseGoesOut() {
  this.src = this.src.substring(0,this.src.lastIndexOf('_')) + ".gif";        
}
     
function showPopup(url, width, height) {
  window.open(url,'','width=' + width + ',height=' + height + ',scrollbars=no,resizable=no,status=no');   
}

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";
 }
}

window.onload = externalLinks;

 
