大家帮我看看我这个函数什么地方出错了?
//下面是我写的函数function showsubadmin_menu()实现的功能是在页面中生成的菜单,无论哪一个,选中的展开或关闭,其他的菜单都是关闭的,可是现在根本没有反映<SCRIPT language=javascript>
function showsubadmin_menu(sid,total)
{
whichEl = eval("subadmin_menu" + sid);
for(m=0;m<=total;m++)
{
if (m=sid)
{
if (whichEl.style.display == "none")
{
eval("subadmin_menu" + sid + ".style.display=\"\";");
}
else
{
eval("subadmin_menu" + sid + ".style.display=\"none\";");
}
}
else
{
eval("subadmin_menu" + m + ".style.display=\"none\";");
}
}
}
</SCRIPT>
//下面是函数的调用
<%
k=ubound(admin_menu,1)
for i=0 to ubound(admin_menu,1)
if isempty(admin_menu(i,0)) then exit for
%>
<TR >
<TD background=Images/admin_left_<%=i+1%>.gif height=25 style="cursor:hand" class=admin_menu_title id=admin_menuTitle onclick="showsubadmin_menu(<%=i%>,<%=k%>)">
<strong><font color="#6699CC"> <%=admin_menu(i,0)%></font></strong>
</TD>
</TR>
<TR >
<TD id='subadmin_menu<%=i%>' <%if i<>0 then %> style="display:none"<%end if%>> <DIV class=sec_menu style="WIDTH: 158px">
<table cellpadding=0 cellspacing=0 align=center width=135>
.............
<%next%>