// JavaScript Document
var lastSubMenuID;
//记录最后点击的子菜单
function doRecord(subMenuID) {
document.getElementById(subMenuID).style.display = "none";
lastSubMenuID = subMenuID;
}
//隐藏子菜单
function hideLastSubMenu() {
if(lastSubMenuID == undefined || lastSubMenuID == "") {
return;
} else {
var lastSubMenu = document.getElementById(lastSubMenuID);
lastSubMenu.style.display = "none";
}
}
//显示子菜单
function showSubMenu(subMenuID) {
if(lastSubMenuID == subMenuID) {
if(document.getElementById(lastSubMenuID).style.display == "block") {
document.getElementById(lastSubMenuID).style.display = "none";
return;
}
}
if(lastSubMenuID == undefined) {
doRecord(subMenuID);
}else{
hideLastSubMenu();
doRecord(subMenuID);
}
changeMenuState(subMenuID);
}
//改变子菜单的样式
function changeMenuState(subMenuID) {
var subMenu = document.getElementById(subMenuID);
//subMenu.style.filter = "progidXImageTransform.Microsoft.Wipe()";
//subMenu.filters[0].apply();
subMenu.style.display = "block";
//subMenu.filters[0].play();
}