
   // preload images for menu rollovers

   if (document.images) 
   {
      var menudir = "/images/menu/";
      var dirs = new Array
      (
         "home","about","exhibitions","events","education","news","shop","support","visit","opportunities","donate","contact","cart","eventcart"
      );

      for (i=0; i<dirs.length; i++)
      {
         for (state=1; state<3; state++)
         { 
            eval(dirs[i] + state + " = new Image(100,16);");
            eval(dirs[i] + state + ".src = menudir + '" + dirs[i] + state + ".gif';");
         }
      }
   }

   // simple image replacements

   function rollOn(imgID)
   {
      if (document.images) document.images[imgID].src = eval(imgID + "2.src"); 
   }

   function rollOff(imgID)
   {
      if (document.images) document.images[imgID].src = eval(imgID + "1.src"); 
   }

   // display a zoomed image box

   function zoom(id,img,x,y)
   {
      // distance scrolled down

      var d = 0;

      if (window.pageYOffset)
      {
         d = window.pageYOffset;
      }
      else if (document.documentElement && document.documentElement.scrollTop)
      {
         d = document.documentElement.scrollTop;
      }
      else if (document.body)
      {
         d = document.body.scrollTop;
      }

      // available window width

      var wx = 0;
      var wy = 0;

      if (window.innerWidth)
      {
         wx = window.innerWidth;
         wy = window.innerHeight;
      }
      else if (document.documentElement && document.documentElement.clientWidth)
      {
         wx = document.documentElement.clientWidth;
         wy = document.documentElement.clientHeight;
      }
      else if (document.body)
      {
         wx = document.body.clientWidth;
         wy = document.body.clientHeight;
      }

      // position and display box

      box = document.getElementById("zoom" + id);
      box.style.left = (wx - x)/2 - 10;
      box.style.top = (wy - y)/2 + d - 67;
      box.style.display = "block";

      big = document.getElementById("zoom" + id + "img");
      big.src = "images/enlarge/" + img;
   }

   // hide a zoomed image box

   function unzoom(id)
   {
      box = document.getElementById("zoom" + id);
      box.style.display = "none";
   }


