<?php
if (!defined('IN_CONTEXT')) die('access violation error!');

if (!function_exists('showLMenu')) {
    function showLMenu(&$menu_tree) {
        // TODO : Deal with article categoried list link in menu
        foreach ($menu_tree as $menu) {
    ?>
    <li>
    <?php
            if (sizeof($menu->slaves['MenuItem']) > 0) {
    ?>
    <span><?php echo $menu->name; ?></span>
    <ul>
	    <?php showLMenu($menu->slaves['MenuItem']); ?>
    </ul>
    <?php
            } else {
    ?>
    <a href="<?php if($menu->mi_category == 'outer_url') echo $menu->link; else echo 'index.php?'.$menu->link ?>">
    <?php echo $menu->name; ?></a>
    <?php
            }
    ?>
    </li>
    <?php
        }
    }
}

$id_seed = Toolkit::randomStr();
?>

<div class="list_main">
	<div class="list_title"><?php echo ParamHolder::get('block_title'); ?></div>
	<div class="prod_type">
		<ul id="leftmenu_<?php echo $id_seed; ?>">
			<?php showLMenu($menus); ?>
			<div class="blankbar1"></div>
		</ul>		
		
	</div>
	<div class="list_bot"></div>
</div>
<div class="blankbar"></div>



<script type="text/javascript" language="javascript">
<!--
	$(function() {
		$("#leftmenu_<?php echo $id_seed; ?>").droppy();
    });
//-->
</script>
