!if $module = home
!set path = ./adm/
!else
!set path = $empty
!endif
!!read themes/$wims_theme/local.phtml
!!read themes/_procs/homemenu.proc
!if $wims_homeref_n0=1 and itemsep isin $wims_rm_0
!set wims_homeref_n0=0
!endif
!!delete a line itemsep,0 at the beginning without third argument
!set wims_rm_0=!nonempty line $wims_rm_0
!set tmp_=!line 1 of $wims_rm_0
!if itemsep isitemof $(tmp_[1]) and $(tmp_[3])=$empty
!set wims_rm_0=!line 2 to -1 of $wims_rm_0
!endif
!set tmp_=!line -1 of $wims_rm_0
!if (itemsep isitemof $(tmp_[1]) or $(tmp_[1])=$empty) and $(tmp_[3])=$empty
!set wims_rm_0=!line 1 to -2 of $wims_rm_0
!endif
!if $wims_homeref_n0+$wims_homeref_n4 + $wims_homeref_n5 + $wims_homeref_local_n0>0
<!-- _widgets/menumodubox.phtml -->
<div id="wimsmenumodubox">
!if $wims_homeref_n0>0
!set started=0
!for i_=1 to $wims_homeref_n0
!set 1_=!line $i_ of $wims_rm_0
!if $(1_[1])$(1_[2]) != $empty
!if $is_link!=0
!if $started=0
<$div0 class="wimsmenu homeref_n0">
!set started=1
!endif
!set wims_ref_class = !item 1 of $1_
!set wims_ref_class = !word 1 of $wims_ref_class
!if " isin $wims_ref_class
!reset wims_ref_class
!endif
<$div1 class="menuitem $wims_ref_class">
!read $(path)oneitem.phtml $1_
</$div1>
!reset wims_ref_class
!else
!if $started=1
</$div0>
!if $i_ !=$wims_homeref_n0
<hr class="itemsep" />
!endif
!endif
!set item_text = !item 3 of $1_
!if $item_text notsametext $empty
<h2 class="menu_title">
!read $(path)oneitem.phtml $1_
</h2>
!endif
<$div0 class="wimsmenu homeref_n0">
!set started=1
!endif
!endif
!next i_
</$div0><!--wimsmenu-->
!endif wims_homeref_n0
!if $wims_homeref_n5>0
<$div0 class="wimsmenu homeref_n5">
!for i_=1 to $wims_homeref_n5
!!<$div1 class="menuitem ">
!set 1_=!line $i_ of $wims_rm_5
!read $(path)oneitem.phtml $1_
!!</$div1><!-- menuitem-->
!next i_
</$div0><!--wimsmenu-->
!endif wims_homeref_n5
!if $wims_homeref_n4>0
<$div0 class="wimsmenu homeref_n4">
!for i_=1 to $wims_homeref_n4
!set 1_=!line $i_ of $wims_rm_4
!set wims_ref_class = !item 1 of $1_
!if " isin $wims_ref_class
!endif
<$div1 class="menuitem $wims_ref_class">
!read $(path)oneitem.phtml $1_
</$div1>
</$div0><!--wimsmenu-->
!endif wims_homeref_n4
!if $wims_homeref_local_n0>0
<$div0 class="wimsmenu homeref_local_n0">
!for i_=1 to $wims_homeref_local_n0
!set 1_=!line $i_ of $wims_local_menu_items
!if $(1_[1])=
<$div1 class="itemsep"> </$div1>
!else
!set wims_ref_class = !item 1 of $1_
!if " isin $wims_ref_class
!reset wims_ref_class
!endif
<$div1 class="menuitem $wims_ref_class">
!read $(path)oneitem.phtml $1_
</$div1>
!reset wims_ref_class
!endif
!next i_
</$div0><!--/wimsmenu-->
!endif wims_homeref_local_n0
</div> <!--/wimsmenumodubox-->
<!-- end _widgets/menumodubox.phtml -->
!endif wims_homeref_n0+wims_homeref_n4+$wims_homeref_n5