
/*  holds the names/locations of images for
    the buttons in the "pushed state" and "normal state"   */
var the_imagesNotPushedName = new Array('images/Button1White.gif','images/Button2White.gif','images/Button3White.gif','images/Button4White.gif','images/Button5White.gif');
var the_imagesPushedName = new Array('images/Button1WhitePush.gif','images/Button2WhitePush.gif','images/Button3WhitePush.gif','images/Button4WhitePush.gif','images/Button5WhitePush.gif');

/*  holds the actual images (cached) for
    the buttons in the "pushed state" and "normal state"   */
var the_imagesNotPushed = new Array();
var the_imagesPushed = new Array();


/*   Preload Images into cache   */

function doPreload()
{
 for(loop = 0; loop < the_imagesPushedName.length; loop++)
 {
  the_imagesNotPushed[loop] = new Image();
  the_imagesNotPushed[loop].src = the_imagesNotPushedName[loop];
  the_imagesPushed[loop] = new Image();
  the_imagesPushed[loop].src = the_imagesPushedName[loop];
 }
}

/*   Display Images as "Pushed" for onMouseOver or
     "Normal" for onMouseOut   */

function doonMouseOver(buttonPushed)
{
 if(the_imagesPushed[buttonPushed].complete)
   /* only change image if it has loaded */
 {
  document.images[buttonPushed].src = the_imagesPushed[buttonPushed].src;
 }
}

function doonMouseOut(buttonPushed)
{
 if(the_imagesNotPushed[buttonPushed].complete)
   /* only change image if it has loaded */
 {
  document.images[buttonPushed].src = the_imagesNotPushed[buttonPushed].src;
 }
}
