<{if $menuid eq 'top'}>
<div id='menutbl'>
<nav id="main-nav">
<ul id="main-menu" class="sm sm-blue">
<li id='leftmenubtnbox' class="a11y_box" tabindex="0"><i title='<{$smarty.const._THEME_MENU21}>' id='leftmenubtn' name='open'  class="fa-solid fa-align-justify"></i></li>
<li id='gohomebtn'><a title='<{$smarty.const._THEME_MENU02}>' href='<{xoAppUrl}>'><i  aria-hidden="true" class="fa-solid fa-house-chimney"><span class="sr-only"><{$smarty.const._THEME_MENU02}></span></i></a></li>
<{foreach item=mt_group from=$blockmenu.mt_group  name=mt_group}>
<li class='blocklevel1 <{cycle values="menu01,menu02"}>'><{$setting|menu_admin_btn:$mt_group}><a class='manulevel1'  target='<{if $mt_group.target eq '0'}>_self<{else}>_blank<{/if}>' title='<{$mt_group.sorttitle}>'  <{if $mt_group.url}>href='<{$mt_group.url}>'<{else}> href='javascript:void(0);' onclick='return false;'<{/if}>><{$mt_group.sorttitle}></a>
<{if $mt_group.subMenu}>
<ul>
<{foreach item=subMenu from=$mt_group.subMenu  name=subMenu}>
<{assign var="m2" value=$subMenu.sortid}>
<{if $blockmenu.db_name|grouppermission:" where `sortid` = '$m2' order by  sortid  ASC":"browsegroup":true}>
<li class='blocklevel2'><a class='manulevel2'  target='<{if $subMenu.target eq '0'}>_self<{else}>_blank<{/if}>' title='<{$subMenu.sorttitle}>'  <{if $subMenu.url}>href='<{$subMenu.url}>'<{else}> href='javascript:void(0);' onclick='return false;'<{/if}>><{$subMenu.sorttitle}></a>
<{if $subMenu.subMenu}>
<ul>
<{foreach item=subsubMenu from=$subMenu.subMenu  name=subsubMenu}>
<{assign var="m3" value=$subsubMenu.sortid}>
<{if $blockmenu.db_name|grouppermission:" where `sortid` = '$m3' order by  sortid  ASC":"browsegroup":true}>
<li class='blocklevel3'><a class='manulevel3'  target='<{if $subsubMenu.target eq '0'}>_self<{else}>_blank<{/if}>' title='<{$subsubMenu.sorttitle}>'  <{if $subsubMenu.url}>href='<{$subsubMenu.url}>'<{else}> href='javascript:void(0);' onclick='return false;'<{/if}>><{$subsubMenu.sorttitle}></a>
<{/if}>
<{/foreach}>
</ul>
<{/if}>

</li>
<{/if}>
<{/foreach}> 
</ul>
<{/if}>
</li>
<{/foreach}>
</ul>
</nav>
</div>


<{if $btnpadding}>
<style type="text/css"> 
#menutbl #main-nav   .manulevel1{
padding-left: <{$btnpadding}>px;
padding-right: <{$btnpadding}>px;
}
</style> 
<{/if}>
<!-- SmartMenus jQuery plugin -->
<script type="text/javascript" src="<{$xoops_imageurl}><{$themefolder}>/js/smartmenus/jquery.smartmenus.js"></script>
<!-- SmartMenus jQuery init -->
<script type="text/javascript">
$(function() {
  var $menuwidth = $('body').width();
  var $menusize = ($menuwidth - 1423) / 6;
  $('#main-menu').smartmenus({
  <{if $zoomswitch}>
  subMenusSubOffsetX: $menusize,
  <{else}>
  subMenusSubOffsetX: 0,
  <{/if}>
   subMenusSubOffsetY: -8,
 //mainMenuSubOffsetY: 10, //子選單距離menu距離
   subMenusMaxWidth: '<{if $xoops_langcode eq 'zh-TW'}>15em<{else}>22em<{/if}>',
 //showOnClick: true, //點擊開啟子選單
   subMenusMinWidth: '<{if $xoops_langcode eq 'zh-TW'}>15em<{else}>22em<{/if}>' 
 //scrollAccelerate:false,
 //keepInViewport:true
  });
});
</script>
<{/if}>


<{if $menuid eq 'bottom' && $blockmenu.mb_group}>
<div id="menutblbottom" >
<div id='himglcbottom' class='<{$bbtnstyle.bottom}>'>
<ul class='menubottom'>
<{foreach item=blocklevel1 from=$blockmenu.mb_group}>  
<li class='menubottom1'><div><{$setting|menu_admin_btn:$blocklevel1}><a class='manulevel1'  target='<{if $blocklevel1.target eq '0'}>_self<{else}>_blank<{/if}>' title='<{$blocklevel1.sorttitle}>'  <{if $blocklevel1.url}>href='<{$blocklevel1.url}>'<{else}> href='javascript:void(0);' onclick='return false;'<{/if}>><{$blocklevel1.sorttitle}></a></div>
<ul>
<{foreach item=blocklevel2 from=$blocklevel1.subMenu}>  
<{assign var="m2" value=$blocklevel2.sortid}>
<{if $blockmenu.db_name|grouppermission:" where `sortid` = '$m2' order by  sortid  ASC":"browsegroup":true}>
<li <{if $blocklevel2.subMenu}>id='blocklevel3true'<{/if}> class='menubottom2'><div><a class='manulevel2'  target='<{if $blocklevel2.target eq '0'}>_self<{else}>_blank<{/if}>' title='<{$blocklevel2.sorttitle}>'  <{if $blocklevel2.url}>href='<{$blocklevel2.url}>'<{else}> href='javascript:void(0);' onclick='return false;'<{/if}>><{$blocklevel2.sorttitle}></a></div><{if $blocklevel2.subMenu}><div id='buttomboxbtn'><a  tabindex='0' type='button' id='buttom<{$blocklevel2.sortid}>'><{$smarty.const.THEME_BLOCKSADMIN14}></a></div><{/if}>
<{if $blocklevel2.subMenu}>
<ul style='display: none;' id='buttombox<{$blocklevel2.sortid}>' name='<{$blocklevel2.sortid}>'  class='buttomeach'>
<{foreach item=blocklevel3 from=$blocklevel2.subMenu}>
<{assign var="m3" value=$blocklevel3.sortid}>
<{if $blockmenu.db_name|grouppermission:" where `sortid` = '$m3' order by  sortid  ASC":"browsegroup":true}>
<li class='menubottom3'><div><i class="fa-solid fa-right-long"></i> <a class='manulevel3'  target='<{if $blocklevel3.target eq '0'}>_self<{else}>_blank<{/if}>' title='<{$blocklevel3.sorttitle}>'  <{if $blocklevel3.url}>href='<{$blocklevel3.url}>'<{else}> href='javascript:void(0);' onclick='return false;'<{/if}>><{$blocklevel3.sorttitle}></a></div></li>
<{/if}>
<{/foreach}> 
</ul>
<{/if}>
</li>
<{/if}>
<{/foreach}> 
</ul>
</li>
<{/foreach}> 
</ul>
<div style='clear:both;'></div>
</div>
</div>
<script> 
$(document).ready(function() {
  $("#menutblbottom .buttomeach").each(function(index) {
    $btn = $(this).attr("name");
    if ($btn != undefined) {
      var $btnname = "#menutblbottom #buttom" + $btn + "";
      var $btnnamebox = "#menutblbottom #buttombox" + $btn + "";
    }
    $($btnname).click(function() {
      $($btnnamebox).slideToggle("fast");
    });

  $("body").on("keydown", $btnname, function(event) {
    if (event.key === 'Enter' || event.keyCode === 13) {
      event.preventDefault(); 
      $($btnnamebox).slideToggle("fast");
    }
  });


  });
}); 
</script>
<{/if}>

<{if $menuid eq 'rmenufloat' && $tplvar.rmenufloat}>
<div id="fixmenu" tabindex="1">
<a tabindex="0" href='javascript:void(0);' onclick='return false;' id='float_box' onclick='return false;' class="sr-only" title='<{$smarty.const._THEME_GB_08}>'  aria-label="<{$smarty.const._THEME_GB_08}>"><{$smarty.const._THEME_GB_08}></a>
<ul>
<{if $tplvar.consultbtn}>
<li>
<div id="consultbtn"><a href="<{$xoops_url}>/modules/neilproduct/shopwcase.php?op=commconsult" title="<{$smarty.const._MA_NEIL_THEMES_LANGUAGE_01}>" ><{$smarty.const._MA_NEIL_THEMES_LANGUAGE_01}></a><span class="badge number2"><{$tplvar.conscount}></span></div>
</li>
<{/if}>
<{if $fbfansurlYN}>
<li>
<div id="fbfansbutton"><a href="<{$fbfansurl}>" title="<{$xoops_sitename}><{$smarty.const.THEME_FBBUTTON}>" target="_blank"><{$xoops_sitename}><{$smarty.const.THEME_FBBUTTON}></a></div>
</li>
<{/if}>
<{if $lineYN}>
<li>
<div id="linebutton"><a href="<{$line}>" title="<{$smarty.const._THEME_LINE01}><{$xoops_sitename}>LINE<{$smarty.const._THEME_LINE02}>" target="_blank"><{$smarty.const._THEME_LINE01}><{$xoops_sitename}>LINE<{$smarty.const._THEME_LINE02}></a></div>
</li>
<{/if}>
<{if $fbYN}>
<li>
<div id="fbmessagesbutton"><a href="https://www.messenger.com/t/<{$fbuID}>" title="<{$smarty.const._THEME_LINE01}><{$xoops_sitename}>FB<{$smarty.const._THEME_FB02}>" target="_blank"><{$smarty.const._THEME_FB01}><{$xoops_sitename}>fb<{$smarty.const._THEME_FB02}></a></div>
</li>
<{/if}>
<{if $contactusYN}>
<li>
<div id="contactus"><a title="<{$xoops_sitename}><{$smarty.const.THEME_CONTACTUS}>" target="_blank" href="<{$mailto}><{$contactus}>"><{$xoops_sitename}><{$smarty.const.THEME_CONTACTUS}></a></div>
</li>
<{/if}>
<li>
<div id="rbookmark">  <a title="<{$smarty.const._THEME_TOP}>" href="#" id="goTop2"><{$smarty.const._THEME_TOP}></a></div>
</li>
</ul>
</div>
<{/if}>
<{if ($menuid eq 'barbox' && !$tplvar.rmenufloat) && ($fbfansurlYN || $lineYN || $fbYN || $contactusYN) }>

<div id='communitybarbox'>
<ul>
<{if $fbfansurlYN}>
<li>
<div id="fbfansbutton"><a href="<{$fbfansurl}>" title="<{$xoops_sitename}><{$smarty.const.THEME_FBBUTTON}>" target="_blank"><{$xoops_sitename}><{$smarty.const.THEME_FBBUTTON}></a></div>
</li>
<{/if}>
<{if $lineYN}>
<li>
<div id="linebutton"><a href="<{$line}>" title="<{$smarty.const._THEME_LINE01}><{$xoops_sitename}>LINE<{$smarty.const._THEME_LINE02}>" target="_blank"><{$smarty.const._THEME_LINE01}><{$xoops_sitename}>LINE<{$smarty.const._THEME_LINE02}></a></div>
</li>
<{/if}>
<{if $fbYN}>
<li>
<div id="fbmessagesbutton"><a href="https://www.messenger.com/t/<{$fbuID}>" title="<{$smarty.const._THEME_LINE01}><{$xoops_sitename}>FB<{$smarty.const._THEME_FB02}>" target="_blank"><{$smarty.const._THEME_FB01}><{$xoops_sitename}>fb<{$smarty.const._THEME_FB02}></a></div>
</li>
<{/if}>
<{if $contactusYN}>
<li>
<div id="contactus"><a title="<{$xoops_sitename}><{$smarty.const.THEME_CONTACTUS}>" target="_blank" href="<{$mailto}><{$contactus}>"><{$xoops_sitename}><{$smarty.const.THEME_CONTACTUS}></a></div>
</li>
<{/if}>
<li>
</li>
</ul>
</div><div style='clear: both;'></div>
<{/if}>


<{if $menuid eq 'leftbox' }>
<div id='leftfloatbox' >
<div id="sidediv">
<div id='leftsidedivbox'>
<{include file="$theme_name/headerform.tpl"}>
<{if ($tplvar.layout eq '3' || $tplvar.layout eq '4' || $tplvar.layout eq '5') &&  $tplvar.b_canvas_left }>
<{include file="$theme_name/blockstpl.tpl" fromvar=$tplvar.b_canvas_left more=false site=left parallax=false class=false}>
<{include file="$theme_name/menutpl.tpl" menuid=barbox}> 
<{/if}>
</div>
</div>
<i aria-label="<{$smarty.const._THEME_MENU22}>" tabindex="0" title='<{$smarty.const._THEME_MENU22}>' id='leftmenubtn' name='close' class="fa-regular fa-circle-xmark a11y_box"><span class='sr-only'><{$smarty.const._THEME_MENU22}></span></i>
</div>
<{/if}>