<!--

// kPanelImageNumber - the number of the LCD panel in the image
// array for the current page.

kPanelImageNumber = 0;

// canManipulateImages - check if the browser we're using can do
// clever stuff with document images. So far, only NetScape (Mozilla)
// v3.0 or better has this capability. This might be better implemented
// by simply specifying the script language as JavaScript 1.1, but
// we'll leave that for the time being.

function canManipulateImages() {
	if (document.images)
		return true;
	else
		return false;
}

// preLoadImage - pre-create and pre-load an image so that it's ready
// when we want to use it.

function preLoadImage(imageURL) {
	if (gImageCapableBrowser) {
		image = new Image();
		image.src = imageURL;
		return image;
	}
}

// updateButton - update both the LCD panel image and the button
// image. We actually pass in a 'result' value to let the function
// know if it should return true or false. Pass 'false' if you
// want the browser to update the status line, 'true' if you want
// the browser to actually do something (i.e. handle a click).

function updateButton(panelMessageName,buttonName,buttonState,result) {
	if (gImageCapableBrowser) {
		var panelImage = eval("imagePanel" + panelMessageName);
		var buttonImage = eval("button" + buttonName + buttonState);
		document ["lcdPanel"].src = panelImage.src;
		document ["button" + buttonName].src = buttonImage.src;
	}
	return result;
}

// gImageCapableBrowser - is this browser hip to images? Set up
// a global variable so that we don't have to keep calling a function
// (useful if the function becomes costly to compute).

gImageCapableBrowser = canManipulateImages();

// Set up all the alternative LCD panels we intend to use.

imagePanelBlank = preLoadImage("http://www.chicagowomenintrades.org/images/imagePanelBlank.gif");
imagePanelOne = preLoadImage("http://www.chicagowomenintrades.org/images/imagePanelOne.gif");
imagePanelTwo = preLoadImage("http://www.chicagowomenintrades.org/images/imagePanelTwo.gif");
imagePanelThree = preLoadImage("http://www.chicagowomenintrades.org/images/imagePanelThree.gif");
imagePanelFour = preLoadImage("http://www.chicagowomenintrades.org/images/imagePanelFour.gif");
imagePanelFive = preLoadImage("http://www.chicagowomenintrades.org/images/imagePanelFive.gif");

// And the buttons

buttonOneInactive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonOneI.jpg");
buttonOneActive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonOneA.jpg");
buttonTwoInactive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonTwoI.jpg");
buttonTwoActive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonTwoA.jpg");
buttonThreeInactive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonThreeI.jpg");
buttonThreeActive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonThreeA.jpg");
buttonFourInactive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonFourI.jpg");
buttonFourActive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonFourA.jpg");
buttonFiveInactive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonFiveI.jpg");
buttonFiveActive = preLoadImage("http://www.chicagowomenintrades.org/images/buttonFiveA.jpg");

// -->