[% IF use_frames %]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>[% title_prefix %][% title %]</title>
    [% PROCESS _common_js.tt %]
    [% UNLESS all_in_one_css %]
    <link href="[% url_prefix %]thruk/themes/[% theme %]/stylesheets/common.css" type="text/css" rel="stylesheet" />
    [% END %]
    <link href="[% url_prefix %]thruk/themes/[% theme %]/stylesheets/thruk_global.css" type="text/css" rel="stylesheet" />
    <link rel="shortcut icon" href="[% url_prefix %]thruk/themes/[% theme %]/images/favicon.ico" type="image/ico" />
    <link rel='stylesheet' type='text/css' href='[% url_prefix %]thruk/themes/[% theme %]/stylesheets/[% theme %].css' />
    <style type="text/css">
    <!--
    HTML {
        overflow: inherit;
        overflow-y: auto;
    }
    -->
    </style>
  </head>
  <body class='navbar'>
[% END %]
    <a href="http://www.thruk.org" target="_blank"><img src="[% url_prefix %]thruk/themes/[% theme %]/images/logo_thruk_small.png" border="0" alt="Thruk" title="Thruk" width="130" height="40" class="nav_small_logo" /></a>

    [% FOREACH section = navigation %]
    [% cookie_section_name = section.name.replace(' ', '_') | lower %]
    <div class="navsection">
      <div class="navsectiontitle clickable">[% section.name %]</div>
      <div class="navsectionlinks"[% IF menu_states.exists(cookie_section_name) && menu_states.$cookie_section_name == 0 %] style="display:none;"[% END %]>
      [%+ FOREACH link = section.links %]
        <ul class="navsectionlinks">
          [%+ IF link.href %]
          <li><a href="[% link.href %]" target="[% link.target %]">[% link.name %]</a>
            [% IF link.links.size > 0 %]
            <ul>
            [% FOREACH sublink = link.links %]
              <li><a href="[% sublink.href %]" target="[% sublink.target %]">[% sublink.name %]</a>
              [% FOREACH addlink = sublink.links %]
                (<a href="[% addlink.href %]" target="[% addlink.target %]">[% addlink.name %]</a>)
              [% END %]
              </li>
            [%+ END %]
            </ul>
            [%+ END %]
          </li>
          [%+ ELSIF link.search %]
          <li class="navbarsearch">
          <div class="navbarsearch">
            <form method="get" action="[% url_prefix %]thruk/cgi-bin/status.cgi" target="[% link.target %]">
              <fieldset>
                <legend>[% link.name %]</legend>
                [% IF use_new_search%]
                <input type='hidden' name='hidesearch' value='2' />
                <input type='hidden' name='s0_op' value='~' />
                <input type='hidden' name='s0_type' value='search' />
                <input type='text' name='s0_value' size='15' class="NavBarSearchItem" id="NavBarSearchItem" />
                [% ELSE %]
                <input type='hidden' name='navbarsearch' value='1' />
                <input type='text' name='host' size='15' class="NavBarSearchItem" id="NavBarSearchItem" />
                [% END %]
              </fieldset>
            </form>
          </div>
          </li>
          [%+ END %]
        </ul>
      [%+ END %]
      </div>
      <div class="navsectionfooter"></div>
    </div>
    [% END %]

    <img src="[% url_prefix %]thruk/themes/[% theme %]/images/greendot.gif" class="hidepics" alt="" width="0" height="0" />
    <img src="[% url_prefix %]thruk/themes/[% theme %]/images/orangedot.gif" class="hidepics" alt="" width="0" height="0" />

[% PROCESS _ajax_search.tt %]

[% PROCESS _side_js.tt %]

[% IF use_frames %]
  </body>
</html>
[% END %]
