showMenu = new Array(3)

function showSubMenu(i) {
	if (showMenu[i]) {
		clearTimeout(showMenu[i])
	}
	var submenuStr = "submenu"+i
	var menuStr = "menu"+i
	if (browserType == "Net4") {
		document.layers[submenuStr].left=document.layers[menuStr+"N"].pageX-6
		document.layers[submenuStr].top=document.layers[menuStr+"N"].pageY+21
		document.layers[submenuStr].visibility="visible"
	}
	if (browserType == "Net6") {
		var spanTags = document.getElementsByTagName("span")
//		alert(spanTags[i-1].offsetParent.offsetLeft + "  " + spanTags[i-1].offsetParent.offsetParent.offsetLeft)
//		var bodyOffsetX = spanTags[i-1].parentElement.parentElement.parentElement.parentElement.offsetLeft
		spanTags[i+3].style.left=spanTags[i-1].offsetParent.offsetLeft+spanTags[i-1].offsetParent.offsetParent.offsetLeft
		spanTags[i+3].style.top=spanTags[i-1].offsetTop+spanTags[i-1].offsetParent.offsetTop+28 //offsetTop+21
		spanTags[i+3].style.visibility="visible"
	}
	if (browserType == "IE4") {
		document.all[submenuStr].style.left=document.all[menuStr].style.left
		document.all[submenuStr].style.top=document.all[menuStr].style.top+24
		document.all[submenuStr].style.visibility="visible"
	}
	if (browserType == "IE5.5") {
		var spanTags = document.getElementsByTagName("span")
		var bodyOffsetX = spanTags[i-1].parentElement.parentElement.parentElement.parentElement.offsetLeft
		spanTags[i+3].style.left=spanTags[i-1].parentElement.offsetLeft+bodyOffsetX
		spanTags[i+3].style.top=spanTags[i-1].parentElement.offsetTop+41
		spanTags[i+3].style.visibility="visible"
	}
}

function exitMenu(i) {
	showMenu[i] = setTimeout("hideSubMenu("+i+")",500)
}

function hideSubMenu(i) {
	var submenuStr = "submenu"+i
	if (browserType == "Net4") {
		document.layers[submenuStr].visibility="hidden"
	}
	if (browserType == "Net6") {
		document.getElementsByTagName("span")[i+3].style.visibility="hidden"
	}
	if (browserType == "IE4") {
		document.all[submenuStr].style.visibility="hidden"
	}
	if (browserType == "IE5.5") {
		document.getElementsByTagName("span")[i+3].style.visibility="hidden"
	}
}
