//////////////////////////////////////////////////////////////////////////
// Java Script Code to provide rollover effect on site navigation buttons
//////////////////////////////////////////////////////////////////////////

/**
  * You may use this code for free on any web page provided that 
  * these comment lines and the following credit remain in the code.
  * "Multimedia Rollovers" from http://www.javascript-fx.com
  */
//Uncomment the next line for random transition rollovers each time the page is loaded
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=1, transition='+Math.floor(Math.random()*23)+') }</STYLE>');

//Uncomment the next line for a specific transition rollovers (transition=0 to 23)
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=1,transition=2) }</STYLE>');

//Uncomment the next line for fading rollovers 
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=1) }</STYLE>');


// Off screen array to hold the images to be displayed when the navigation
//	button is turned "on"
var m_arrOnImages=new Array();

function AddToOnImagesArray(strImageName, strImageSrc)
{
	m_arrOnImages[strImageName] = new Image();
	m_arrOnImages[strImageName].src = strImageSrc;
}

function turnOn(strImageName) 
{ 
	if(document.images[strImageName].filters != null)
	{
		document.images[strImageName].filters[0].stop();
	}
	
	// Save the original document "Off" image in the offSrc property
	document.images[strImageName].offSrc = document.images[strImageName].src;
	
	// Swap in the "On" images
	document.images[strImageName].src    = m_arrOnImages[strImageName].src;	
} 

function turnOff(strImageName) 
{
	if(document.images[strImageName].filters != null)
	{
		document.images[strImageName].filters[0].apply();
	}
	
	// Restore the original document "Off" image
	document.images[strImageName].src = document.images[strImageName].offSrc;
	
	if(document.images[strImageName].filters != null)
	{
		document.images[strImageName].filters[0].play();
	}
} 
 
// Preload the Navigation.htm images to the m_arrOnImages array
//	so that the images are cached and will execute faster
// Note that the Name arg must match the name of the given image
//	specified in the Navigation.htm HTML
AddToOnImagesArray("home", "graphics/home2.gif");
AddToOnImagesArray("schedule", "graphics/schedule2.gif");
AddToOnImagesArray("msgboard", "graphics/msgboard2.gif");
AddToOnImagesArray("news", "graphics/news2.gif");
AddToOnImagesArray("bio", "graphics/bio2.gif");
AddToOnImagesArray("music", "graphics/music2.gif");
AddToOnImagesArray("lyrics", "graphics/lyrics2.gif");
AddToOnImagesArray("photos", "graphics/photos2.gif");
AddToOnImagesArray("links", "graphics/links2.gif");
AddToOnImagesArray("contact", "graphics/contact2.gif");

//alert("finished running jscript")