<?/*
$zm_menu[$zm_current_group][group_name] : 현재 그룹 메뉴 이름. level 1
$zm_menu[$zm_current_group][$i][group_name] : 서브 메뉴의 이름. level 2
$zm_menu[$zm_current_group][$i][$j][group_name] : 서브 메뉴의 서브 메뉴. level 3
*/?>
<style type="text/css">
#zmb_subject		{ border:1px solid #DFDFDF; margin:0 0 5px 0; }
div.title	{ border:0; height:37px; line-height:300%; background:#505C68; font-weight:bold; text-align:center; color:#fff; cursor:pointer; }

#zmb_subject .subject_tree	{ border-top:1px solid #F7F7F7; padding-left:5px; height:28px; text-align:left; color:#6D747A; line-height:250%; }
.subject_tree_on	{ border-top:1px solid #F7F7F7; padding-left:5px; height:28px; text-align:left; background:#ED8600; line-height:250%; cursor:pointer; color:#fff; }
</style>

<script language="javascript">
$(document).ready(function(){
	$(".subject_tree").mouseover(function(){
		this.className = "subject_tree_on";
	}).mouseout(function(){
		this.className = "subject_tree";
	});
});
</script>
<div class="title" onClick="zm_gourl('<?=$zm_menu[$zm_current_group][href]?>')"><?=$zm_menu[$zm_current_group][group_name]?></div>
<div id="zmb_subject">
<?	for($i = 0; $i < count($zm_menu[$zm_current_group]); $i++) :
		if($zm_menu[$zm_current_group][$i][level] == 2) :
?>
			<div class="<?=($zm_menu[$zm_current_group][$i][current] == "1")?'subject_tree_on':'subject_tree'?>" onClick="zm_gourl('<?=$zm_menu[$zm_current_group][$i][href]?>')">· 
				<span><?=$zm_menu[$zm_current_group][$i][group_name]?></span>
			</div>
<?			for($j = 0; $j < count($zm_menu[$zm_current_group][$i]); $j++) :
				if($zm_menu[$zm_current_group][$i][$j][level] == 3) : ?>
					<div class="<?=($zm_menu[$zm_current_group][$i][$j][current] == "1")?'subject_tree_on':'subject_tree'?>" onClick="zm_gourl('<?=$zm_menu[$zm_current_group][$i][$j][href]?>')">
					&nbsp;&nbsp;&nbsp;-	<span><?=$zm_menu[$zm_current_group][$i][$j][group_name]?></span>
					</div>
<?				endif;
			endfor; 
		endif;
	endfor; ?>
</div>