//
//  Rollver script for static pages
//
//Init Global Variables
rollonImages  = new Array();
rolloffImages = new Array();
var num_images = 7;	                //number of images with rollover states
var imagePrefix = "http://www.seniorstheatre.org/images/button";  //path to rollover images and shared name portion


//Preload Images
if (javascript_version > 1.0)
	{
	for(count = 1; count <= num_images; count++)
		{
		rollonImages[count]         = new Image();      
		rollonImages[count].src     = imagePrefix + count + "on.gif"; 
		rolloffImages[count]        = new Image();      
		rolloffImages[count].src    = imagePrefix + count + "off.gif"; 
		}
	}
	 

function rollon(imgName)
	{
	// this function changes images to the rollover state (assigned above)
	// it's called by the ONMOUSEOVER attribute of the HREF element
		
	var imgNum = imgName.substring(5);

	if (document.images && document.images[imgName].complete)
		{
		document.images[imgName].src = rollonImages[imgNum].src;
		}
	}


function rolloff(imgName)
	{
	// this function changes images to the off state (assigned above)
	// it's called by the ONMOUSEOUT attribute of the HREF element

	var imgNum = imgName.substring(5);

	if (document.images && document.images[imgName].complete)
		{
		document.images[imgName].src = rolloffImages[imgNum].src;
		}
	}
