// 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() {
	toolson = new Image();
	toolson.src = "/images/tools1.gif";
	toolsoff = new Image();
	toolsoff.src = "/images/tools0.gif";
	perspectiveson = new Image();
	perspectiveson.src = "/images/perspectives1.gif";
	perspectivesoff = new Image();
	perspectivesoff.src = "/images/perspectives0.gif";
	publicationson = new Image();
	publicationson.src = "/images/publications1.gif";
	publicationsoff = new Image();
	publicationsoff.src = "/images/publications0.gif";
	abouton = new Image();
	abouton.src = "/images/about1.gif";
	aboutoff = new Image();
	aboutoff.src = "/images/about0.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";
	}

}

