		/*
			JavaScript preload and image swap by Erick Adam
			(C) 2007 All Rights Reserved
			Use of this script is free for private and commerical 
			usage as long as this header remains compelte and intact.
			
			To Use:
				1. Create your mouseover images. This will consist of a variable number of
				   pairs of images - an 'off' image (the defualt state for a button), and an 
					 'on' image (the image to use when the mouse is over). Each pair will need
					 to be assigned a Unique Name. The 'off' image should then be named 
					 Nav_[UniqueName].gif, and the 'on' image should be named 
					 Nav_[UniqueName]_Hover.gif.
				2. Save all the images in the images directory of your web site.
				3. Define the number of pairs (i.e., actual number of images / 2)
				   in the code below.
				4. List all your unique names (case sesitive) in the code below.
				5. in your HTML code, specify the Name and ID parameters for the IMG tag
				   as the Unique Name you specified for that image.
				6. add the following code inside each of your IMG tags that you want to mouse over:
				      onmouseover="DoBtn(this.name, 'on');" onmouseout="DoBtn(this.name, 'off');"
				7. All your mouse over images will now preload and display quickly when moused over.
		*/
		
		var x = 4; //Number of buttons to mouse over
		var aryNames = new Array(x);
		
		//Fill in names of buttons
		aryNames[0] = "ItemSize";
		aryNames[1] = "SaleRack";
		aryNames[2] = "Collections";
		aryNames[3] = "BrandStyle";

		/* DO NOT EDIT BELOW THIS LINE */		
		var n;
		var aryImages = MultiDimensionalArray(x,2);
		var preLoad = new Image();

		for (n=0; n < x; n++) {
			//var aryImages[n] = new Array(2);
			aryImages[n][0] = "images/LeftNav_" + aryNames[n] + ".gif";
			preLoad.src = aryImages[n][0];
			aryImages[n][1] = "images/LeftNav_" + aryNames[n] + "_Hover.gif";
			preLoad.src = aryImages[n][1];
		}
		
		function MultiDimensionalArray(iRows,iCols)
		{
		var i;
		var j;
		   var a = new Array(iRows);
		   for (i=0; i < iRows; i++)
		   {
		       a[i] = new Array(iCols);
		       for (j=0; j < iCols; j++)
		       {
		           a[i][j] = "";
		       }
		   }
		   return(a);
		} 

		function DoBtn(btnName, Oper) {
			var i;
			for (n=0; n < x; n++) {
				if (aryNames[n] == btnName) i = n;
			}
			if (i > -1) {
				if (Oper == "off") {
					document[btnName].src = aryImages[i][0];
				} else {
					document[btnName].src = aryImages[i][1];
				}
			}
		}
