<!--
// -- Button Mouseover ----------------------------------------------
// HISTORY:	Francis Preston	January 12, 1998
//				Francis Preston	February 12, 1999	
//										Modifyed existiog code to use the 
//										Image object
//																
// PURPOSE:	Provide user uith a simple tool that will perform
//				image swapping to give the effect of a button mouse
//				over
//  IN:	nameattrib	- the name used in the <IMG> tag NAME attribute
//			Type 	- Image type 
//					- OV for OnMouseOver
//					- OUT for OnMouseOut
// ------------------------------------------------------------------
//Global arrays
var BNumber = new Array();
var ButtonsOV = new Array();
var ButtonsOUT = new Array();
var ImagPath = "";

function setSwapImg(nameattrib, Type)
{
	if(navigator.appVersion.substring(0,1) >= 3)
	{
		var Count, Layer;
		
		//Find the location of the image in the BNumber list
		for(Locater=0; Locater<=BNumber.length; Locater++)
		{
			if(BNumber[Locater] == nameattrib)
				break;
		}
	
		// If the image exists in the document object, change the source.
		if (document.images[nameattrib])
		{
			if (Type == "OV")
			{
				document.images[nameattrib].src = ButtonsOV[Locater].src;
			}
			else
			{
				document.images[nameattrib].src = ButtonsOUT[Locater].src;
			}//END IF TYPE
			return;
		}
		else if (document.layers)
		{
			// For Netscape, check the layers for the named image.
			var Located = false;
			for (Count = 0; Count < layerList.length && !Located; Count++)
			{
				layer = getLayer(layerList[Count]);
				if (layer.document.images[nameattrib])
				{
					if (Type == "OV")
					{
						layer.document.images[nameattrib].src = ButtonsOV[Locater].src;
					}
					else
					{
						layer.document.images[nameattrib].src = ButtonsOUT[Locater].src;
					}// END IF TYPE
					Located = true;
				} // END IF
			}// END FOR
		}// END IF
	}// END IF
}// END FUNCTION

//-- cachImages() -----------------------------------------------------
// HISTORY:	Francis Preston	January 12, 1998
// PURPOSE:	To pre-cache the images for mouseOvers, mouseDowns
//				and mouseOut
//  IN:	ImageList 	- 	an array list of file names 
//							  	without the action lable and file
//								extention.
//
//		NOTE: Be sure to name images in the following manner:	
//				imageName_ov.gif	- for mouseOver Images
//				imageName.gif		- for mouseOut Images
// --------------------------------------------------------------------
function cachImages(ImageList, Path)
{           
	if (navigator.appVersion.substring(0,1) >= 3) 
	{
		ImagePath = Path;
		BNumber = ImageList;
		for (var i = 0; i < ImageList.length; i++)
		{
			ButtonsOV[i] = new Image();
			ButtonsOUT[i] = new Image();
			ButtonsOV[i].src = Path + ImageList[i] + '_ov.gif';
			ButtonsOUT[i].src = Path + ImageList[i] + '.gif';
		}//END FOR
	}//END IF
}//END Cash_Img
//-->