/*GLOBAL VARIABLES*/

/* Images are preloaded into each page by storing them in arrays.
   These special "on/off" arrays are used with the imageOn() and imageOff() functions below
*/
if (document.images)
{	/* creates "on" array and populates with Image objects */
	var onImgArray = new Array();

	onImgArray["grayBar1"] = new Image(70,4);
	onImgArray["grayBar2"] = new Image(70,4);
	onImgArray["grayBar3"] = new Image(70,4);
	/* sets URLs for the "on" images */
	onImgArray["grayBar1"].src = "../Images/gray_dot.gif";
	onImgArray["grayBar2"].src = "../Images/gray_dot.gif";
	onImgArray["grayBar3"].src = "../Images/gray_dot.gif";

	/* creates "off" array and populates with Image objects */
	var offImgArray = new Array();

	offImgArray["grayBar1"] = new Image(70,4);
	offImgArray["grayBar2"] = new Image(70,4);
	offImgArray["grayBar3"] = new Image(70,4);
	/* sets URLs for the "off" images */
	offImgArray["grayBar1"].src = "../Images/spacer.gif";
	offImgArray["grayBar2"].src = "../Images/spacer.gif";
	offImgArray["grayBar3"].src = "../Images/spacer.gif";
}

/*FUNCTIONS*/

function toggleGrayBars(intBar)
{
	/* When placed in captioned images' onmouseover event handlers, 
 	   this function toggles their gray bar of the selected image when the images are moused over.
           (an example of captioned images can be found in debt.htm)
	*/

	switch(intBar)
	{
		case 1:
			imageOn("grayBar1");
			imageOff("grayBar2");
			if ( document.getElementById("grayBar3") ) imageOff("grayBar3");
			break;
		case 2:
			imageOff("grayBar1");
			imageOn("grayBar2");
			if ( document.getElementById("grayBar3") ) imageOff("grayBar3");
			break;
		case 3:
			imageOff("grayBar1");
			imageOff("grayBar2");
			imageOn("grayBar3");
			break;
	}
}