

/*  holds the names/locations of images for

    the buttons in the "pushed state" and "normal state"   */

var the_imagesNotPushedName = new Array('../images/ButtonHome.GIF','../images/ButtonStandardBrush.GIF','../images/ButtonCustomBrush.GIF','../images/ButtonGolf.GIF','../images/ButtonAdvertisingNetwork.GIF','../images/ButtonRegistration.GIF','../images/ButtonConsulting.GIF','../images/ButtonAboutUs.GIF','../images/ButtonContactUs.GIF','../images/ButtonComments.GIF');

var the_imagesPushedName = new Array('../images/ButtonHomePush.GIF','../images/ButtonStandardBrushPush.GIF','../images/ButtonCustomBrushPush.GIF','../images/ButtonGolfPush.GIF','../images/ButtonAdvertisingNetworkPush.GIF','../images/ButtonRegistrationPush.GIF','../images/ButtonConsultingPush.GIF','../images/ButtonAboutUsPush.GIF','../images/ButtonContactUsPush.GIF','../images/ButtonCommentsPush.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;

 }

}