

   // preload images for menu and toolbar rollovers

   if (document.images) 
   {
      menudir = "/images/menu/2009/";

      toolbarHome1 = new Image(91,25);
      toolbarHome1.src = menudir + "home1.gif";
      toolbarHome2 = new Image(91,25);
      toolbarHome2.src = menudir + "home2.gif";

      toolbarAbout1 = new Image(74,25);
      toolbarAbout1.src = menudir + "about1.gif";
      toolbarAbout2 = new Image(74,25);
      toolbarAbout2.src = menudir + "about2.gif";

      toolbarEvents1 = new Image(117,25);
      toolbarEvents1.src = menudir + "events1.gif";
      toolbarEvents2 = new Image(117,25);
      toolbarEvents2.src = menudir + "events2.gif";

      toolbarVisit1 = new Image(133,25);
      toolbarVisit1.src = menudir + "visit1.gif";
      toolbarVisit2 = new Image(133,25);
      toolbarVisit2.src = menudir + "visit2.gif";

      toolbarEducation1 = new Image(79,25);
      toolbarEducation1.src = menudir + "education1.gif";
      toolbarEducation2 = new Image(79,25);
      toolbarEducation2.src = menudir + "education2.gif";

      toolbarSupport1 = new Image(161,25);
      toolbarSupport1.src = menudir + "support1.gif";
      toolbarSupport2 = new Image(161,25);
      toolbarSupport2.src = menudir + "support2.gif";

      toolbarNews1 = new Image(54,25);
      toolbarNews1.src = menudir + "news1.gif";
      toolbarNews2 = new Image(54,25);
      toolbarNews2.src = menudir + "news2.gif";

      toolbarFestival1 = new Image(98,25);
      toolbarFestival1.src = menudir + "festival1.gif";
      toolbarFestival2 = new Image(98,25);
      toolbarFestival2.src = menudir + "festival2.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"); 
   }

   // legacy image replacements

   function imgSwap(imgDocID,imgObjName) 
   {
      if (document.images) document.images[imgDocID].src = eval(imgObjName + ".src"); 
   }

   // create a zoomed window

   function zoomWindow(imgURL,x,y,winName)
   {
      newWin = window.open('',winName,'status=no,width=' + x + ',height=' + y);
      html = '<html><head><title>The Kimmel Center</title></head><body style="margin: 0px; padding: 0px;">';
      html += '<img src="' + imgURL + '" width="' + x + '" height="' + y + '" border="0" alt="" /></body></html>';
      newWin.document.write(html);
      newWin.document.close();
      return false;
   }

   // retrieve a calendar month

   function getMonth(yrmo)
   {
      $('#monthdiv').load("/month.php?month=" + yrmo);
      hideDay();
   }

   // retrieve a single day's listing

   function getDay(day)
   {
      $('#daydisplay').hide(1,function()
      {
         $('#daydiv').load("/day.php?id=" + day,function()
         {
            $('#daydisplay').html($('#daydiv').html());
            $('#daydisplay').slideDown('fast');
         });
      });
   }

   // hide day listing

   function hideDay()
   {
      $('#daydisplay').hide(1,function()
      {
         $('#daydisplay').html($('#upcoming').html());
         $('#daydisplay').slideDown('fast');
      });
   };


