/* MENU */
var liMenu = null;
var ulMenu = null;
var liMenuClassName = null;
var cacheMenu = null;

function showMenu(li) {
	if (liMenu != null) {
		liMenu.className = liMenuClassName;
		var uls = liMenu.getElementsByTagName("ul");
		for (var index=0; index<uls.length; index++) {
			if ((typeof(uls[index]) != 'undefined') && (uls[index] != null)) {
				if (typeof(uls[index].style) != 'undefined') {
					if (typeof(uls[index].style.display) != 'undefined') {
						uls[index].style.display = 'none';
					}
				}
			}
		}
	}
	liMenu = li;
	if (liMenu != null) {
		liMenuClassName = liMenu.className;
		liMenu.className = 'over';
		var uls = liMenu.getElementsByTagName("ul");
		for (var index=0; index<uls.length; index++) {
			if ((typeof(uls[index]) != 'undefined') && (uls[index] != null)) {
				if (typeof(uls[index].style) != 'undefined') {
					if (typeof(uls[index].style.display) != 'undefined') {
						uls[index].style.display = 'inline';
						uls[index].focus();
					}
				}
			}
		}
	}
	cacheMenu.style.display = 'inline';
}

function hideMenu() {
	if ((liMenu != null) && (liMenuClassName !== null)) {
		liMenu.className = liMenuClassName;
		var uls = liMenu.getElementsByTagName("ul");
		for (var index=0; index<uls.length; index++) {
			if ((typeof(uls[index]) != 'undefined') && (uls[index] != null)) {
				if (typeof(uls[index].style) != 'undefined') {
					if (typeof(uls[index].style.display) != 'undefined') {
						uls[index].style.display = 'none';
					}
				}
			}
		}
	}
	cacheMenu.style.display = 'none';
	liMenu = null;
	ulMenu = null;
	liMenuClassName = null;
}

function initMenu() {
	cacheMenu = document.getElementById('menu_hide');
}