
   // 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";
   }

   // simple image replacement

   function imgSwap(objID,imgID)
   {
      if (document.images) document.images[objID].src = eval(imgID + ".src"); 
   }

   // toggle a section's visibility

   function tog(oid)
   {
      lid = '#' + oid + '1';
      pid = '#' + oid + '2';
      $(lid).css('background-image', ($(pid).is(':hidden') ? "url('/images/caretminus.gif')" : "url('/images/caretplus.gif')"));
      $(pid).slideToggle();
   }



