<?/*
$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">
div.sub_title	{ border:1px solid #C7CBCE; border-bottom:1px solid #9D9EA3; font:bold 15px 나눔고딕; height:37px; line-height:240%; background:#F7F7F7; text-align:center; color:#282828; cursor:pointer; }

#zmb_subject		{ border:1px solid #C7CBCE; margin:0 0 5px 0; }
#zmb_subject .submenu	{ padding-left:5px; height:30px; font:12px 나눔고딕; text-align:left; line-height:230%; border-bottom:1px solid #EFEFEF; }
#zmb_subject .submenu:last-child	{ border-bottom:0; }
#zmb_subject .subject_tree		{ color:#242424; }
#zmb_subject .subject_tree_on	{ background:#F7F7F7; cursor:pointer; color:#242424; }
#zmb_subject span.sub_lv1	{ margin-left:10px; }
#zmb_subject span.sub_lv2	{ margin-left:20px; font:11px Dotum; color:#848484; }
</style>

<script language="javascript">
$(document).ready(function(){
	$(".subject_tree").mouseover(function(){
		this.className = "subject_tree_on submenu";
	}).mouseout(function(){
		this.className = "subject_tree submenu";
	});
});
</script>
<div class="sub_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="submenu <?=($zm_menu[$zm_current_group][$i][current] == "1")?'subject_tree_on':'subject_tree'?>" onClick="zm_gourl('<?=$zm_menu[$zm_current_group][$i][href]?>')"><span class="sub_lv1"><?=$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="submenu <?=($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]?>')"><span class="sub_lv2">- <?=$zm_menu[$zm_current_group][$i][$j][group_name]?></span>
					</div>
<?				endif;
			endfor; 
		endif;
	endfor; ?>
</div>