function display(menuid, url) {
	var isSpecial = false || document.getElementById;
	if (isSpecial) {
		// hide all except the menu we're selecting or selecting from
		hideAll(menuid);
		var div = document.getElementById("menu_" + menuid);
		if (div) {
			if (div.style.display == 'block') {
				div.style.display = 'none';
			} else {
				div.style.display = 'block';
			}
		}
	}
	// jump to page, if appropriate
	if ((url == "#" && ! isSpecial) || url != "#") {
		if (url.indexOf("://") < 0) {
			url = url.replace(/#/, location).replace(/([?&])showmenu=[0-9_]*/, "$1showmenu=" + menuid);
			if (url.indexOf("showmenu") < 0)
				url += "&showmenu=" + menuid;
		}
		location = url;
	}
}

var allmenuids = new Array();
function hideAll(except) {
	var parts = except.split("_");
	for (var i = 0; i < allmenuids.length; i++) {
		var hide = true;
		var id = new Array();
		for (var j = 0; j < parts.length; j++) {
			id[id.length] = parts[j];
			if (allmenuids[i] == id.join("_")) {
				hide = false;
				break;
			}
		}
		if (hide) {
			document.getElementById("menu_" + allmenuids[i]).style.display = 'none';
		}
	}
}

