// Generic rollover functions

function overImage(imgName) {
	if (document.images) {
		imgOn = eval(imgName + "on.src");
		document [imgName].src = imgOn;	
	}
}

function offImage(imgName) {
	if (document.images) {
		imgOff = eval(imgName + "off.src");
		document [imgName].src = imgOff;	
	}
}

function loadImages() {
	button1on = new Image();
	button1on.src = "images/button1_on.gif";
	button1off = new Image();
	button1off.src = "images/button1.gif";
	button2on = new Image();
	button2on.src = "images/button2_on.gif";
	button2off = new Image();
	button2off.src = "images/button2.gif";
	button3on = new Image();
	button3on.src = "images/button3_on.gif";
	button3off = new Image();
	button3off.src = "images/button3.gif";
	button4on = new Image();
	button4on.src = "images/button4_on.gif";
	button4off = new Image();
	button4off.src = "images/button4.gif";
	button5on = new Image();
	button5on.src = "images/button5_on.gif";
	button5off = new Image();
	button5off.src = "images/button5.gif";
	button6on = new Image();
	button6on.src = "images/button6_on.gif";
	button6off = new Image();
	button6off.src = "images/button6.gif";
	button7on = new Image();
	button7on.src = "images/button7_on.gif";
	button7off = new Image();
	button7off.src = "images/button7.gif";
}

if (document.images) {
	loadImages();
}

// Returns a handle to the named layer.

function getLayer(name) {

	if (document.layers) {
		return(document.layers[name]);
	}
	else {
		layer = document.getElementById(name);
		if (layer) {
			return(layer);
		} else {
			return(null);
		}
	}
}

// Hides the named layer

function hideLayer(name) {

	var layer = getLayer(name);

	if (layer.style) {
		layer.style.visibility="hidden";	
	} else {
		layer.visibility="hide";
	}

}

// Shows the named layer

function showLayer(name) {

	var layer = getLayer(name);

	if (layer.style) {
		layer.style.visibility="visible";	
	} else {
		layer.visibility="show";
	}

}