<!-- //start

// Menus
function reDo() {
	window.location.reload();
}
window.onresize = reDo;

var timerID = null; 
var timerOn = false; 
var timecount = 500; 
var what = null; 
var newbrowser = true; 
var check = false;

function initMenus() {
	if(document.getElementById) {
		layerRef="document.getElementByID";
		styleSwitch=".style";
		what="dom1";
	} else if (document.layers) {
		layerRef="document.layers";
		styleSwitch="";
		what ="ns4";
	} else if(document.all) {
		layerRef="document.all";
		styleSwitch=".style";
		what ="ie4";
	} else {
		what="none";
		newbrowser = false;
	}
	check = true;
}

function getRealPosition(element, which) {
	position = 0
	while (element != null) {
		position += element["offset" + which]
		element = element.offsetParent
	}
	return position
}

function showLayer(layerName) {
	if(check) {
		if (what =="none") {
return;
		} else if (what == "dom1") {
var element = document.getElementById(layerName);
var parent = element.parentNode;
if (element != null) {
	element.style.visibility="visible";
	element.style.display="block";
	element.style.left=(getRealPosition(parent, "Left") + 135) + "px";
	element.style.top=(getRealPosition(parent, "Top") + 5) + "px";
}
		} else if (what == "ns4") {
var element = document.layers[layerName];
var parent = element.parentNode; // TBD: how to really get this?
if (element != null) {
	element.visibility="visible";
	element.display="block";
	element.left=(getRealPosition(parent, "Left") + 135) + "px"; // TBD: ?
	element.top=(getRealPosition(parent, "Top") + 5) + "px"; // TBD: ?
}
		} else {
var element = document.all[layerName];
var parent = element.parentNode; // TBD: how to really get this?
if (element != null) {
	element.style.visibility="visible";
	element.style.display="block";
	element.style.left=(getRealPosition(parent, "Left") + 135) + "px";
	element.style.top=(getRealPosition(parent, "Top") + 5) + "px";
}
		}
	} else {
		return;
	}
}

function hideLayer(layerName) {
	if(check) {
		if (what == "none") {
return;
		} else if (what == "dom1") {
var element = document.getElementById(layerName);
if (element != null) {
	element.style.visibility="hidden";
	element.style.display="none";
}
		} else if (what == "ns4") {
var element = document.layers[layerName];
if (element != null) {
	element.visibility="hidden";
	element.display="none";
}
		} else {
var element = document.all[layerName];
if (element != null) {
	element.style.visibility="hidden";
	element.style.display="none";
}
		}
	} else {
		return;
	}
}

var layer_list = new Array();
layer_list[0] = "grounds";
layer_list[1] = "grief";
layer_list[2] = "local";

function hideAll(omittedLayerName) {
	for (i = 0; i < layer_list.length; i++) {
		if (omittedLayerName != layer_list[i]) {
hideLayer(layer_list[i]);
		}
	}
}

function startTime() {
	if (timerOn == false) {
		timerID = setTimeout("hideAll()", timecount);
		timerOn = true;
	}
}

function stopTime() {
	if (timerOn) {
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

//-->
