

var coff, con;

function initNav() {
  if (document.getElementById) {
      navColl = document.getElementById('homeNavCtr').getElementsByTagName('A');
      for (i=0; i<navColl.length; i++) {
          navColl[i].onmouseover = showCircs;
          navColl[i].onmouseout = showCircs;
          navColl[i].nextSibling.src = coff.src;
      }
      acoll = document.getElementsByTagName("A");
      for (i=0; i<acoll.length; i++) {
        if (acoll[i].getAttribute("rel") && acoll[i].getAttribute("rel") == "external")
          acoll[i].target = "_blank";
      }
  }
}

document.getEventTarget = function ( e ) {
   var targ;
   if (!e) var e = window.event;
   if (e.target) targ = e.target;
   else if (e.srcElement) targ = e.srcElement;
   if (targ.nodeType == 3) targ = targ.parentNode; // defeat Safari bug
   return targ;
}

function showCircs(e) {
   var elem = document.getEventTarget(e);
   if (!e) e = window.event;
   elem.parentNode.nextSibling.src = (e.type == 'mouseover')? con.src : coff.src;
}

if (document.images) {
  coff = new Image();
  coff.src = "/gfx/navs/ccoff.gif";
  con = new Image();
  con.src = "/gfx/navs/ccon.gif";

  window.onload = initNav;
}
