/*
 * $Id: rollover-sub.js,v 1.1.1.1 2004/03/29 23:21:03 cor Exp $
 *
 * Rollover for the pages in subdirectories of the site.
 * For now I use this ugly hack so that we can test our pages
 * at home, something which would not be possible with non-relative
 * paths to the images
 */
   var gfx = new Array();
   var imgsdir = "../images/";
   var onsfx = "_over.gif";
   var offsfx = ".gif";
   var gfxcnt = 0;
   
   function createGfx(name) {
       this.name = name;
       this.off = new Image();
       this.off.src = imgsdir + name + offsfx;
       this.on = new Image();
       this.on.src = imgsdir + name + onsfx;
   }
   
   function addGfx(name) {
       gfx[gfxcnt] = new createGfx(name);
       gfxcnt++;
   }
   
   function inout(num, stat) {
       if (!stat)
           document.images[gfx[num].name].src = gfx[num].off.src;
       else
           document.images[gfx[num].name].src = gfx[num].on.src;
   }
