// JavaScript Document// Suppresses all JavaScript error dialogs
window.onerror = null;

var menuActive = 0;
var onLayer;
var timeOn = null;
var menuOn = null;
var highlightedDiv;


// Shows a layer according to name
function showLayer(layerName) {
if (timeOn != null) {
clearTimeout(timeOn);
	clearTimeout(menuOn);
	hideLayer(onLayer);
	dropDownOut(highlightedDiv)
}

if (document.getElementById) {
document.getElementById(layerName).style.visibility = "visible";
}
else if (document.layers) {
document.layers[layerName].visibility = "show";
}
else if (document.all) {
document.all[layerName].style.visibility = "visible";
}
onLayer = layerName;
}


// Hides the layer
// This function isn't called in the HTML page but it's used below in the timeout function
function hideLayer(layerName) {
if (menuActive == 0) {
if (document.getElementById) {
document.getElementById(layerName).style.visibility = "hidden";
}
else if (document.layers) {
document.layers[layerName].visibility = "hidden";
}
else if (document.all) {
document.all[layerName].style.visibility = "hidden";
}
}
}

// Shows up when you roll the mouse over a menu item
function menuOver() {
clearTimeout(timeOn);
clearTimeout(menuOn);
menuActive = 1;
}


// Hides after a brief pause when you roll the mouse off the menu
// Change the 400 to higher and lower numbers to affect this code
function menuOut() {
menuActive = 0;
timeOn = setTimeout("hideLayer(onLayer)", 400);
menuOn = setTimeout("dropDownOut(highlightedDiv)", 400);
}

function dropDownOver(divName){
	if (document.getElementById) {
		document.getElementById(divName).style.color = "#FFFFFF";
		document.getElementById(divName).style.backgroundColor = "#3E6846";	
	}
	else if (document.layers) {
		document.layers[divName].color = "#FFFFFF";
		document.layers[divName].backgroundColor = "#3E6846";
	}
	else if (document.all) {
		document.all[divName].style.color = "#FFFFFF";
		document.all[divName].style.backgroundColor = "#3E6846";
	}
	
	highlightedDiv = divName

}


function dropDownOut(layerName){

	if (menuActive == 0) {
	if (document.getElementById) {
		document.getElementById(layerName).style.backgroundColor = "#FFFFFF";
		document.getElementById(layerName).style.color = "#000000";
	}
	else if (document.layers) {
		document.layers[layerName].backgroundColor = "#FFFFFF";
		document.layers[layerName].color = "#000000";
	}
	else if (document.all) {
		document.all[layerName].style.backgroundColor = "#FFFFFF";
		document.all[layerName].style.color  = "#000000";
	}
	}

}

