//
//  Rollver script for static pages
//
//Init Global Variables
rollonImages  = new Array();
rolloffImages = new Array();
var num_images = 8;	                //number of images with rollover states


//Preload Images
if (javascript_version > 1.0)
	{
		
		rollonImages[1] = new Image();
		rollonImages[1].src = "images/home_on.gif";
		rolloffImages[1] = new Image();
		rolloffImages[1].src = "images/home_off.gif";
		
		rollonImages[2] = new Image();
		rollonImages[2].src = "images/about_on.gif";
		rolloffImages[2] = new Image();
		rolloffImages[2].src = "images/about_off.gif";
		
		rollonImages[3] = new Image();
		rollonImages[3].src = "images/aboutcindy_on.gif";
		rolloffImages[3] = new Image();
		rolloffImages[3].src = "images/aboutcindy_off.gif";
				
		rollonImages[4] = new Image();
		rollonImages[4].src = "images/relationships_on.gif";
		rolloffImages[4] = new Image();
		rolloffImages[4].src = "images/relationships_off.gif";
				
		rollonImages[5] = new Image();
		rollonImages[5].src = "images/shop_on.gif";
		rolloffImages[5] = new Image();
		rolloffImages[5].src = "images/shop_off.gif";
		
		rollonImages[6] = new Image();
		rollonImages[6].src = "images/services_on.gif";
		rolloffImages[6] = new Image();
		rolloffImages[6].src = "images/services_off.gif";
		
		rollonImages[7] = new Image();
		rollonImages[7].src = "images/contact_on.gif";
		rolloffImages[7] = new Image();
		rolloffImages[7].src = "images/contact_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;
		}
	}
