<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo SYS_CHARSET ?>">
<title>menu</title>
<link href="<?php echo SYS_ADMIN_STYLE_PATH ?>style/menu.css" rel="stylesheet" type="text/css">
<SCRIPT >
window.top.loadMenu = true;
function showsubmenu(sid)
{
    var prefix = "submenu_";
    var tagO =  document.getElementsByTagName("tr");
    for (var ti=0;ti<tagO.length;ti++)
    {    
        if(tagO[ti].id.substr(0,prefix.length)==prefix)
        {
            if(tagO[ti].id==prefix+sid)
            {	
                tagO[ti].style.display="";
            }
            else
            {
                tagO[ti].style.display="none";
            } 
        }
    }

}
function tourl(tourl)
{
	window.top.curShowMsg ="";
	window.top.rightfrm.location=tourl;
}
function showline()
{
	
}
function hiddenline()
{
	
}
</SCRIPT>
</head>

<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" >
<TABLE height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0" class="menu_tb_bg">
<TR>
<TD vAlign="top" width="185" height="100%">
<TABLE id="mainbar" height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD width="185" vAlign="top" >

<?php
foreach($adminmenu_arr as $key=>$val) : 
if($val['status'] == 0):
?>
<table cellpadding="0" cellspacing="0" width="182" align="center">
    <tr>
        <td align="center" height="30" class="menu_title" onmouseover="showline()"; onmouseout="hiddenline()";  onclick="showsubmenu('<?php echo $val['id'] ?>')">
            <b><span id="title<?php echo $val['id'] ?>"><?php echo $val['title'] ?></span></b>
        </td>
    </tr>
    <tr style="display:none" id="submenu_<?php echo $val['id'] ?>">
        <td class="sec_menu">
            <ul>
            <?php 
            if($val['eifr_child']) :
            foreach($val['eifr_child'] as $row) : 
            if($row['status'] == 0):
            ?>
                <li onMouseOver="this.className='menu_mouseover'" onMouseOut="this.className='menu_mouseout'"  onclick="tourl('../<?php echo $row['tourl'] ?>')">
                <a href='../<?php echo $row['tourl'] ?>' target='rightfrm'><?php echo $row['title'] ?></a>
                </li>
            <?php 
            endif;
            endforeach;
            endif ?>
            </ul>
        </td>
 	</tr>
    <tr><td height='6'></td></tr>
</table>
<?php 
endif;
endforeach
?>		
</TD>
</tr>
</table>
</td>
<SCRIPT>
     window.parent.document.getElementById("swicthbar").cols='190, *';
     
     var imgCollapse=new Image();
     imgCollapse.src='<?php echo SYS_ADMIN_STYLE_PATH ?>images/collapse.gif';
     var imgExpand=new Image();
     imgExpand.src='<?php echo SYS_ADMIN_STYLE_PATH ?>images/expand.gif';
     var imgNow=imgCollapse;
     var mainbar = document.getElementById("mainbar");
     mainbar.style.display='block';
     
     function switchpanel()
     {
      if(mainbar.style.display=='block')
      {
       mainbar.style.display='none';
       imgNow=imgExpand;
       window.parent.document.getElementById("swicthbar").cols='6, *';
       window.top.statusfrm.document.getElementById("start_menu").style.display="none";
      }
      else
      {
       mainbar.style.display='block';
       imgNow=imgCollapse;
       window.parent.document.getElementById("swicthbar").cols='190, *';
       window.top.statusfrm.document.getElementById("start_menu").style.display="";
      }
      document.getElementById("colbtn").src=imgNow.src;
     }

    </SCRIPT>
<TD bgColor="#eeeedd"  style="CURSOR: hand" onclick="switchpanel()">
 <IMG id="colbtn" src="<?php echo SYS_ADMIN_STYLE_PATH ?>images/collapse.gif" >
</TD>
</tr>
</table>
</body>
</html>
