<!--
	/*
     ************************************************************************************************************************
	 * FILENAME:		navBar.js																							*
	 * PROGRAMMER:		Anthony Nguyen																						*
	 * DESCRIPTION:		This file provides functions for preloading the navigation bar images for rollover effects, etc.	*
	 * DATE CREATED:	Febrruary 23, 2004																					*
	 ************************************************************************************************************************
	*/
	
	/* Global variables */
	
	//first create an array of normal images.
	var NormalImages = new Array();
	NormalImages[0] = new Image();
	NormalImages[1] = new Image();
	NormalImages[2] = new Image();
	NormalImages[3] = new Image();
	NormalImages[4] = new Image();
	
	//then create an array of rollover images.
	var RollOverImages = new Array();
	RollOverImages[0] = new Image();
	RollOverImages[1] = new Image();
	RollOverImages[2] = new Image();
	RollOverImages[3] = new Image();
	RollOverImages[4] = new Image();
	
	//now begin to pre-load the proper images so image swapping has no delay for downloading.
		
	//begin to preload all the normal images...
	NormalImages[0].src = "/images/navbar/aboutusoff.gif";
	NormalImages[1].src = "/images/navbar/featuredoff.gif";
	NormalImages[2].src = "/images/navbar/catalogoff.gif";
	NormalImages[3].src = "/images/navbar/virtualoff.gif";
	NormalImages[4].src = "/images/navbar/contactusoff.gif";
	
	//now preload the rollover images...
	RollOverImages[0].src = "/images/navbar/aboutuson.gif";
	RollOverImages[1].src = "/images/navbar/featuredon.gif";
	RollOverImages[2].src = "/images/navbar/catalogon.gif";
	RollOverImages[3].src = "/images/navbar/virtualon.gif";
	RollOverImages[4].src = "/images/navbar/contactuson.gif";
	
   /*
	 ************************************************************************************************************************
	 * FUNCTION:		switchImage																							*
	 * PARAMETERS:		name - the name of the image																		*
	 *					eventType - the type of event happening so we can determine which image ti swap.					*
	 *					index - the index of the image to swap.																*
	 * DESCRIPTION:	This function swaps the proper image with the one requested, depending on the event that triggered it.	*
	 ************************************************************************************************************************
	*/
	function rollover(name, eventType, index) {
		//check to see if its a mouse over event.
		if (eventType == "mouseover")
			//if so, then swap the normal image with the rollover image.
			document.images[name].src = RollOverImages[index].src;
		else if (eventType == "mouseout")
			//else, if this is a mouseout event, then swap the rollover image, with the normal image.
			document.images[name].src = NormalImages[index].src;
	}
//-->