
/* ***********************************************  */
/* **********   START of Frame Buster  ***********  */
/* ***********************************************  */

function ensureTop()
{
  if (top != self)
    top.location.href = location.href;
}

/* ***********************************************  */
/* **********   END of Frame Buster    ***********  */
/* ***********************************************  */


/* ***********************************************  */
/* *************   START of MailTo  **************  */
/* ***********************************************  */

function wrtemlStand(pMlT1, pMlH, pMlT2)
{
  document.write('<a href="mailto:');
  document.write(pMlH);
  document.write('@');
  document.write(pMlT1);
  document.write('.');
  document.write(pMlT2);
  document.write('">');
  document.write(pMlH);
  document.write('@');
  document.write(pMlT1);
  document.write('.');
  document.write(pMlT2);
  document.write('</a>');
}

function wrtemlCust(pMlT1, pMlH, pMlT2, pWrd)
{
  document.write('<a href="mailto:');
  document.write(pMlH);
  document.write('@');
  document.write(pMlT1);
  document.write('.');
  document.write(pMlT2);
  document.write('">');
  document.write(pWrd);
  document.write('</a>');
}

/* ***********************************************  */
/* **************   END of MailTo  ***************  */
/* ***********************************************  */





/* ****************************************************  */
/* *********   START of CellarDoorSlideshow  **********  */
/* ****************************************************  */


// Swap images variables
  var gCellarDoorArray = new Array(6);

// Slide show variables
   var gCellarDoorDelay = 8000;
   var gCellarDoorFrame = 0;
   var gCellarDoorOK = 1;
   var gNumCellarDoors = 5;
   var gCellarDoorImage = 1;    // The order of the banner image on the web page

// Slide show functions

   function loadCellarDoor(pImagePath, pImageName, pImageExtension)
   {
      for (var i=0; i<gNumCellarDoors;i++)
      {
        gCellarDoorArray[i] = new Image();
        gCellarDoorArray[i].src = pImagePath + "/" + pImageName  + (i) + "." + pImageExtension;
        // document.write(pImagePath + "/" + pImageName  + (i) + "." + pImageExtension);
      }
   }



   function freezeCellarDoor()
   {
      gCellarDoorOK = 0;
   }

   function unfreezeCellarDoor()
   {
      gCellarDoorOK = 1;
   }

   function delayCellarDoor()
   {
      gCellarDoorOK = 0;
      //setTimeout("doCellarDoor()", 12000);
      setTimeout("doCellarDoor()", 8000);
      gCellarDoorOK = 1;
   }


   function doCellarDoor()
   {

      if (gCellarDoorOK == 1)
      {
        gCellarDoorFrame = gCellarDoorFrame % gNumCellarDoors;
        document.images[gCellarDoorImage].src = gCellarDoorArray[(gCellarDoorFrame)].src;
        gCellarDoorFrame++;
      }

      gInterval = setTimeout("doCellarDoor()", gCellarDoorDelay);
   }




/* ***********************************************  */
/* **********   END of CellarDoorSlideshow  ***********  */
/* ***********************************************  */










