
// imagePath, if set, is the path for images loaded with getImage();
imagePath = "";
// imageExt, is the filename extension for image files, default is ".gif"
imageExt = ".gif";

// changes the image represented by 'imageName' to the "On" image
function turnOn(imageName) {
	if (document.images) {
		document[imageName].src = eval(imageName + "On.src");
	}
}


// changes the image represented by 'imageName' to the "Off" image
function turnOff(imageName) {
	if (document.images) {
		document[imageName].src = eval(imageName + "Off.src");
	}
}


// sets the imagePath used in getImage();
function setImagePath(path) {
	imagePath = path;
}


// sets the imageExt used in getImage();
function setImageExt(ext) {
	imageExt = ext;
}


// loads an image into memory and returns it.  'filename' is the filename 
// without the ".gif" ending.
function getImage(filename) {
	img = new Image(); 
	img.src = imagePath + filename + imageExt;
	return img;
}

