// Stop all JavaScript errors

function stoperror(){
	return true;
}
window.onerror=stoperror;

// 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;	
	}
}

// Navigation rollover functions

function overNav(which) {
	which.className = "greylr orangebg navnormal";
}

function offNav(which) {
	which.className = "greylr ltorangebg navnormal";
}

function offNavM(which) {
	which.className = "greylr medorangebg navnormal";
}

function overLastNav(whichCode) {
	document.getElementById(whichCode+"TL").className = "orangebgL";
	document.getElementById(whichCode+"TR").className = "orangebgR";
	document.getElementById(whichCode+"M").className = "orangebg navlast";
	document [whichCode+"BL"].src = navbotLon.src;
	document [whichCode+"BR"].src = navbotRon.src;
}

function offLastNav(whichCode) {
	document.getElementById(whichCode+"TL").className = "ltorangebgL";
	document.getElementById(whichCode+"TR").className = "ltorangebgR";
	document.getElementById(whichCode+"M").className = "ltorangebg navlast";
	document [whichCode+"BL"].src = navbotLoff.src;
	document [whichCode+"BR"].src = navbotRoff.src;
}

// 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";
	}

}