/* images is a global associative array for handling rollovers. 
 * Each rollover has a unique name called imagePrefix
 * There must exist an image called (imageDir + imagePrefix + "_on.gif")
 * and an image called (imageDir + imagePrefix + "_off.gif")
 * The image should be preloaded in the head of the page or tile, 
 * by calling preloadImage(imageDir, imagePrefix). The image tag should then
 * have onMouseOver="highLight(imagePrefix);" 
 * and onMouseOut="unHighLight(imagePrefix);"
 */
 

if (top != self) {top.location=self.location;};

var images = new Array();

function preloadImage(imageDir, imagePrefix) {
  images[imagePrefix + "_on"]  = new Image();
  images[imagePrefix + "_on"].src = imageDir + "/" + imagePrefix + "_on.gif";
  images[imagePrefix + "_off"]  = new Image();
  images[imagePrefix + "_off"].src = imageDir + "/" + imagePrefix + "_off.gif";
}

function highLight(imagePrefix) {
  document.images[imagePrefix].src = images[imagePrefix + "_on"].src;
  return true;
}

function unHighLight(imagePrefix) {
  document.images[imagePrefix].src = images[imagePrefix + "_off"].src;
  return true;
}