var count=0;//Make a counter
var limit=new Array();//Used to record which menus are currently displayed
var countlimit=1;//Open menus at the same time Number, can be customized
function expandIt(el) {
obj = eval("" el);
if (obj.style.display == "none") {
obj.style. display = "block";//Display submenu
if (countlimit[count]=el;//Enter array
count;
}
else {
eval("" limit[0]).style.display = "none";
for (i=0;ilimit[limit.length-1]=el;
}
}
else {
obj.style.display = "none";
var j;
for (i=0;ifor (i=j;ilimit[limit.length-1]=null;//Delete the last digit of the array
count--;
}
}
// - ->