if (document.images) {
    var boardNum = 0;
    var boardSpeed = 2000;

    // Create an array of images for the billboard 
    var billboard = new Array();
    billboard[0] = new Image();
    billboard[0].src = "images/Rotate/3.jpg";
    billboard[1] = new Image();
    billboard[1].src = "images/Rotate/4.jpg";
    billboard[2] = new Image();
    billboard[2].src = "images/Rotate/5.jpg";
    billboard[3] = new Image();
    billboard[3].src = "images/Rotate/6.jpg";
    
}

// Function to rotate the images on the billboard
function rotateBoard() {
    if (boardNum < (billboard.length - 1)) {
         boardNum++;
    }
    else {
        boardNum = 0;
    }
    document.billboard.src = billboard[boardNum].src;
    setTimeout('rotateBoard()', boardSpeed);
}
// on mouse rollover is created using the _on image of the new Image() array
// the _off button is the image when the client does not have their mouse over the button
            
	    var loaded = (!(navigator.userAgent.indexOf('Netscape6')+1));

            img1on = new Image();
            img1on.src = "images/buttons/home_on.gif";
            img1off = new Image();
            img1off.src = "images/buttons/home_off.gif";
            
	    img2on = new Image();
            img2on.src = "images/buttons/photo_on.gif";
            img2off = new Image();
            img2off.src =  "images/buttons/photo_off.gif";
            
            img3on = new Image();
            img3on.src = "images/buttons/lodging_on.gif";
            img3off = new Image();
            img3off.src = "images/buttons/lodging_off.gif";
		
		img4on = new Image();
            img4on.src = "images/buttons/sponsors_on.gif";
            img4off = new Image();
            img4off.src = "images/buttons/sponsors_off.gif";
		
		img5on = new Image();
            img5on.src = "images/buttons/contact_on.gif";
            img5off = new Image();
            img5off.src = "images/buttons/contact_off.gif";
		
		img6on = new Image();
            img6on.src = "images/buttons/directions_on.gif";
            img6off = new Image();
            img6off.src = "images/buttons/directions_off.gif";
            
            img7on = new Image();
            img7on.src = "images/buttons/events_on.gif";
            img7off = new Image();
            img7off.src = "images/buttons/events_off.gif";

            img8on = new Image();
            img8on.src = "images/buttons/team_on.gif";
            img8off = new Image();
            img8off.src = "images/buttons/team_off.gif";
          
            img9on = new Image();
            img9on.src = "images/buttons/comments_on.gif";
            img9off = new Image();
            img9off.src = "images/buttons/comments_off.gif";

	    img10on = new Image();
            img10on.src = "images/buttons/swap_on.gif";
            img10off = new Image();
            img10off.src = "images/buttons/swap_off.gif";

	    img11on = new Image();
            img11on.src = "images/buttons/news_on.gif";
            img11off = new Image();
            img11off.src = "images/buttons/news_off.gif"; 

	    img12on = new Image();
            img12on.src = "images/buttons/links_on.gif";
            img12off = new Image();
            img12off.src = "images/buttons/links_off.gif";      
	
	//end of the preloading of the buttons        
           
             
             
// function to switch to an ON image by NAME attribute value
function imgOn(imgName) {
        if (document.images && loaded) {
            document[imgName].src = eval(imgName + "on.src");
        }
}
// fucntion to switch to an OFF image by NAME attribute value
function imgOff(imgName) {
        if (document.images && loaded) {
            document[imgName].src = eval(imgName + "off.src");
        }
}
