<script type="text/javascript" src="{$pathTemplates}default.header.js"></script>
{if !$bEnableFade}
<script type="text/javascript">DDSPEED = 2;DDTIMER = 5</script>
{/if}
<div id="header" class="header">
<ul class="head">
	<li class="logo"><a href="http://www.nagvis.org/"><img src="{$pathImages}/internal/logo_96x25.png" alt="NagVis" /></a></li>
	<li>
		<dl class="dropdown">
			<dt id="views-ddheader" onmouseover="ddMenu('views',1)" onmouseout="ddMenu('views',-1)">{$langOpen} <img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
			<dd id="views-ddcontent" onmouseover="cancelHide('views')" onmouseout="ddMenu('views',-1)">
				<ul>
					{if $permittedOverview}
					<li><a href="{$pathBase}/frontend/nagvis-js/index.php">{$langOverview}</a></li>
					{/if}
					{if count($maps) > 0}
					<li class="spacer"><hr /></li>
					{foreach $maps map}<li>
						{if $map.configError == true}
							<a class="left error" href="#">{$map.mapAlias}</a>
						{else}
							<a class="left" href="{$pathBase}/frontend/nagvis-js/index.php?mod=Map&amp;act=view&amp;show={$map.mapName}{$map.urlParams}">{$map.mapAlias}</a>
						{/if}
						{if $map.permittedEdit}<a class="right" href="{$pathBase}/frontend/wui/index.php?mod=Map&amp;act=edit&amp;show={$map.mapName}{$map.urlParams}">Edit</a>
						{else}<a class="right">&nbsp;</a>{/if}
					</li>{/foreach}
					{/if}
					{if count($automaps) > 0}
					<li class="spacer"><hr /></li>
					{foreach $automaps map}
						<li>{if isset($map) && $map.configError == True}
							<a class="error" href="#">{$map.mapAlias}</a>
						{else}
							<a href="{$pathBase}/frontend/nagvis-js/index.php?mod=AutoMap&amp;act=view&amp;show={$map.mapName}{$map.urlParams}">{$map.mapAlias}</a>
						{/if}</li>
					{/foreach}
					{/if}
					{if $permittedEditAnyMap || $permittedEditMainCfg || $permittedManageBackgrounds || $permittedManageMaps || $permittedManageShapes}
					<li class="spacer"><hr /></li>
					<li><a href="{$pathBase}/frontend/wui/index.php" class="underline">{$langWui}</a></li>
					{else}
					<li class="spacer underline"></li>
					{/if}
				</ul>
			</dd>
		</dl>
	</li>
	{if ($mod == 'Map' && ($permittedEdit == true && $act != 'edit' || $permittedView == true && $act != 'view')) || $mod == 'AutoMap' || $bRotation == true || $permittedSearch}
	<li>
		<dl class="dropdown">
			<dt id="action-ddheader" onmouseover="ddMenu('action',1)" onmouseout="ddMenu('action',-1)">{$langActions} <img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
			<dd id="action-ddcontent" onmouseover="cancelHide('action')" onmouseout="ddMenu('action',-1)">
				<ul>
					{if ($mod == 'Map' || $mod == 'AutoMap') && $permittedSearch}
					<li><a href="javascript:showFrontendDialog(oGeneralProperties.path_server+'?mod=Search&act=view', '{$langSearch}')">{$langSearch}</a></li>
					{/if}
					{if $mod == 'AutoMap'}
					<li><a href="javascript:showFrontendDialog(oGeneralProperties.path_server+'?mod=AutoMap&act=modifyParams&show={$currentMap}'+getAutomapParams(), '{$langModifyAutomapParams}')">{$langModifyAutomapParams}</a></li>
					{/if}
					{if $bRotation == true}
					<li id="rotationStart" style="display:none"><a href="javascript:switchRotation()">{$langRotationStart}</a></li>
					<li id="rotationStop" style="display:inline"><a href="javascript:switchRotation()">{$langRotationStop}</a></li>
					{/if}
					{if $mod == 'AutoMap'}
					<li><a href="javascript:showFrontendDialog(oGeneralProperties.path_server+'?mod=AutoMap&act=automapToMap&show=dialog', '{$langAutomapToMap}')">{$langAutomapToMap}</a></li>
					{/if}
					{if $mod == 'Map' && $permittedEdit == true && $act != 'edit'}
					<li><a href="{$pathBase}/frontend/wui/index.php?mod=Map&amp;act=edit&amp;show={$currentMap}" class="underline">{$langEditMap}</a></li>
					{elseif $mod == 'Map' && $permittedView == true && $act != 'view'}
					<li><a href="{$pathBase}/frontend/nagvis-js/index.php?mod=Map&amp;act=view&amp;show={$currentMap}" class="underline">{$langViewMap}</a></li>
					{else}
					<li class="spacer underline"></li>
					{/if}
				</ul>
			</dd>
		</dl>
	</li>
	{/if}
	{if $mod == 'Map' && $act == 'edit' && $permittedEdit == true}
	<li>
		<dl class="dropdown">
			<dt id="map-ddheader" onmouseover="ddMenu('map',1)" onmouseout="ddMenu('map',-1)">{$langMap} <img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
			<dd id="map-ddcontent" onmouseover="cancelHide('map')" onmouseout="ddMenu('map',-1)">
				<ul>
					<li><a href="javascript:gridToggle()">{$langToggleGrid}</a></li>
					<li class="spacer"><hr /></li>
					<li><a class="submenu-link" id="map-addicon-ddheader" href="#" onmouseover="ddMenu('map-addicon',1,1)" onmouseout="ddMenu('map-addicon',-1)">{$langMapAddIcon}</a></li>
					<li><a class="submenu-link" id="map-addline-ddheader" href="#" onmouseover="ddMenu('map-addline',1,1)" onmouseout="ddMenu('map-addline',-1)">{$langMapAddLine}</a></li>
					<li><a class="submenu-link" id="map-addspecial-ddheader" href="#" onmouseover="ddMenu('map-addspecial',1,1)" onmouseout="ddMenu('map-addspecial',-1)">{$langMapAddSpecial}</a></li>
					<li class="spacer"><hr /></li>
					<li><a href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=Map&act=manageTmpl&show={$currentMap}', '{$langMapManageTmpl}', 300)">{$langMapManageTmpl}</a></li>
					<li><a href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=Map&act=addModify&do=modify&show={$currentMap}&type=global&id=0', '{$langMapOptions}');" class="underline">{$langMapOptions}</a></li>
				</ul>
			</dd>
		</dl>
		<dl class="dropdown subdropdown">
			<dd id="map-addicon-ddcontent" onmouseover="cancelHide('map-addicon');cancelHide('map')" onmouseout="ddMenu('map-addicon',-1,1);ddMenu('map',-1)">
				<ul>
					<li><a class="topline topline" href="javascript:get_click('host',1,'add');ddMenuHide(['map-addicon','map']);">{$langHost}</a></li>
					<li><a class="topline" href="javascript:get_click('service',1,'add');ddMenuHide(['map-addicon','map']);">{$langService}</a></li>
					<li><a class="topline" href="javascript:get_click('hostgroup',1,'add');ddMenuHide(['map-addicon','map']);">{$langHostgroup}</a></li>
					<li><a class="topline" href="javascript:get_click('servicegroup',1,'add');ddMenuHide(['map-addicon','map']);">{$langServicegroup}</a></li>
					<li><a class="topline underline" href="javascript:get_click('map',1,'add');ddMenuHide(['map-addicon','map']);">{$langMap}</a></li>
				</ul>
			</dd>
		</dl>
		<dl class="dropdown subdropdown">
			<dd id="map-addline-ddcontent" onmouseover="cancelHide('map-addline');cancelHide('map')" onmouseout="ddMenu('map-addline',-1,1);ddMenu('map',-1)">
				<ul>
					<li><a class="topline topline" href="javascript:get_click('host',2,'add');ddMenuHide(['map-addline','map']);">{$langHost}</a></li>
					<li><a class="topline" href="javascript:get_click('service',2,'add');ddMenuHide(['map-addline','map']);">{$langService}</a></li>
					<li><a class="topline" href="javascript:get_click('hostgroup',2,'add');ddMenuHide(['map-addline','map']);">{$langHostgroup}</a></li>
					<li><a class="topline" href="javascript:get_click('servicegroup',2,'add');ddMenuHide(['map-addline','map']);">{$langServicegroup}</a></li>
					<li><a class="topline underline" href="javascript:get_click('map',2,'add');ddMenuHide(['map-addline','map']);">{$langMap}</a></li>
				</ul>
			</dd>
		</dl>
		<dl class="dropdown subdropdown">
			<dd id="map-addspecial-ddcontent" onmouseover="cancelHide('map-addspecial');cancelHide('map')" onmouseout="ddMenu('map-addspecial',-1,1);ddMenu('map',-1)">
				<ul>
					<li><a class="topline topline" href="javascript:get_click('shape',1,'add');ddMenuHide(['map-addspecial','map']);">{$langShape}</a></li>
					<li><a class="topline" href="javascript:get_click('textbox',2,'add');ddMenuHide(['map-addspecial','map']);">{$langTextbox}</a></li>
					<li><a class="topline underline" href="javascript:get_click('line',2,'add');ddMenuHide(['map-addspecial','map']);">{$langStateless} {$langLine}</a></li>
				</ul>
			</dd>
		</dl>
	</li>
	{/if}
	{if (($mod == 'Map' && $act == 'edit') || ($mod == 'Welcome' && $act == 'view')) && ($permittedEditMainCfg || $permittedManageBackgrounds || $permittedManageMaps || $permittedManageShapes)}
	<li>
		<dl class="dropdown">
			<dt id="wui-ddheader" onmouseover="ddMenu('wui',1)" onmouseout="ddMenu('wui',-1)">{$langOptions} <img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
			<dd id="wui-ddcontent" onmouseover="cancelHide('wui')" onmouseout="ddMenu('wui',-1)">
				<ul>
					{if $permittedEditMainCfg}<li><a href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=MainCfg&act=edit', '{$langWuiConfiguration}', 970)">{$langWuiConfiguration}</a></li>
					<li class="spacer"><hr /></li>
					<li><a href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=MainCfg&act=manageBackends', '{$langMgmtBackends}');">{$langMgmtBackends}</a></li>{/if}
					{if $permittedManageBackgrounds}<li><a href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=ManageBackgrounds&act=view', '{$langMgmtBackgrounds}');">{$langMgmtBackgrounds}</a></li>{/if}
					{if $permittedManageMaps}<li><a href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=Map&act=manage', '{$langMgmtMaps}');">{$langMgmtMaps}</a></li>{/if}
					{if $permittedManageShapes}<li><a class="underline" href="#" onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=ManageShapes&act=view', '{$langMgmtShapes}');">{$langMgmtShapes}</a></li>{/if}
				</ul>
			</dd>
		</dl>
	</li>
	{/if}
</ul>
<ul class="head right">
	<li><div id="refreshCounterHead"></div></li>
	<li>
		<dl class="dropdown">
		  <dt id="user-ddheader" onmouseover="ddMenu('user',1)" onmouseout="ddMenu('user',-1)">{$langUser}<img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
		  <dd id="user-ddcontent" onmouseover="cancelHide('user')" onmouseout="ddMenu('user',-1)">
		    <ul>
		    	<li><a href="#">{$langLoggedIn}: {$currentUser}</a></li>
		    	{if $supportedChangePassword && $permittedChangePassword}<li><a href="javascript:showFrontendDialog(oGeneralProperties.path_server+'?mod=ChangePassword&act=view', '{$langChangePassword}');">{$langChangePassword}</a></li>{/if}
		    	{if $permittedUserMgmt}<li><a href="javascript:showFrontendDialog(oGeneralProperties.path_server+'?mod=UserMgmt&act=view', '{$langUserMgmt}');">{$langUserMgmt}</a></li>{/if}
		    	{if $permittedRoleMgmt}<li><a href="javascript:showFrontendDialog(oGeneralProperties.path_server+'?mod=RoleMgmt&act=view', '{$langManageRoles}', 500);">{$langManageRoles}</a></li>{/if}
					{if $permittedLogout}<li><a href="#" onclick="getSyncRequest('{$pathBase}/server/core/ajax_handler.php?mod=Auth&amp;act=logout');return false;">{$langLogout}</a></li>{/if}
					<li class="spacer underline"></li>
		    </ul>
		  </dd>
		</dl>
	</li>
	<li>
		<dl class="dropdown">
		  <dt id="language-ddheader" onmouseover="ddMenu('language',1)" onmouseout="ddMenu('language',-1)">{$langChooseLanguage} <img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
		  <dd id="language-ddcontent" onmouseover="cancelHide('language')" onmouseout="ddMenu('language',-1)">
		    <ul>
		    	{foreach $langs lang}<li><a href="{$currentUri}{if strpos($currentUri,'?') !== false}&amp;{else}?{/if}lang={$lang.language}" {if $lang.classUnderline}class="underline"{/if}>{$lang.langLanguageLocated}</a></li>{/foreach}
		    </ul>
		  </dd>
		</dl>
	</li>
	<li>
		<dl class="dropdown">
		  <dt id="support-ddheader" onmouseover="ddMenu('support',1)" onmouseout="ddMenu('support',-1)">{$langNeedHelp} <img src="{$pathTemplateImages}default.header_down.png" alt="&#8711;" /></dt>
		  <dd id="support-ddcontent" onmouseover="cancelHide('support')" onmouseout="ddMenu('support',-1)">
		    <ul>
		      <li><a href="{$pathBase}/docs/{$currentLanguage}/index.html">{$langOnlineDoc}</a></li>
		      <li><a href="http://www.nagios-portal.org/wbb/index.php?page=Board&amp;boardID=42">{$langForum}</a></li>
		      <li><a href="{$pathBase}/frontend/nagvis-js/index.php?mod=Info" class="underline">{$langSupportInfo}</a></li>
		    </ul>
		  </dd>
		</dl>
	</li>
	<li style="width:120px"></li>
</ul>
</div>
