[% SET show_filter_table = 0 IF hidesearch == "1" %]
[% SET show_filter_table = 1 IF hidesearch == "2" %]
<input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/icon_maximize.gif" style="display:[% IF show_filter_table %]none[% ELSE %][% END %];" class="filter_button" id="[% paneprefix %]filter_button" alt="filter" onClick="toggleFilterPane('[% paneprefix %]'); return false;">
[% IF show_form %]
<form action="" method="GET" id="[% paneprefix %]filterForm">
<input type="hidden" name="nav" value="[% nav %]">
[% IF entries %]<input type="hidden" name="entries" value="[% entries %]">[% END %]
<input type="hidden" name="hidesearch" id="hidesearch" value="[% hidesearch %]">
<input type="hidden" name="hidetop" id="hidetop" value="[% hidetop %]">
[% END %]
<table id="[% paneprefix %]all_filter_table" style="display:[% IF show_filter_table %][% ELSE %]none[% END %];" border=0 cellspacing=0 cellpadding=0 onclick="resetRefresh()"><tr>
[% FOR search = searches.$paneprefix %]
[% SET prefix = 's' _ loop.index %]
<td valign="top" class="filter_table">
<table border="1" class='filter' cellspacing="0" cellpadding="0" id="[% paneprefix %][% prefix %]_filter_pane">
  <tr>
    <td class='filter'>
      <table border="0" cellspacing="2" cellpadding="0" id="[% paneprefix %][% prefix %]_filterTable" width="100%">
        <tr>
          <td valign="top" align="left" class='filterTitle filterDisplayTitle' nowrap>
           [% IF loop.first %]
           <div id="[% paneprefix %][% prefix %]_filter_title">
            <a href="#" onClick="toggleFilterPane('[% paneprefix %]'); return false;"><img src="[% url_prefix %]thruk/themes/[% theme %]/images/icon_minimize.gif" class="filter_button_mini" id="[% paneprefix %][% prefix %]_filter_button_mini" alt="filter"></a>
            Display Filters:
           </div>
           [% END %]
           <input type="hidden" name="[% paneprefix %][% prefix %]_hoststatustypes" value="[% search.hoststatustypes %]">
           <input type="hidden" name="[% paneprefix %][% prefix %]_servicestatustypes" value="[% search.servicestatustypes %]">
           <input type="hidden" name="[% paneprefix %][% prefix %]_hostprops" value="[% search.hostprops %]">
           <input type="hidden" name="[% paneprefix %][% prefix %]_serviceprops" value="[% search.serviceprops %]">
          </td>
          <td align="left" class='filterTitle filterDisplayTitle' nowrap>
           [% IF loop.first && show_form == '1' && show_substyle_selector == 1 %]
            <select name="style" id="[% paneprefix %][% prefix %]_style_selector">
              <optgroup label="Host">
                <option value="hostdetail"[% IF   style == 'hostdetail'   %] selected[% END %]>Detail</option>
                <option value="hostoverview"[% IF style == 'overview' && substyle == 'host' || style == 'hostoverview' %] selected[% END %]>Overview</option>
                <option value="hostsummary"[% IF  style == 'summary'  && substyle == 'host' || style == 'hostsummary'  %] selected[% END %]>Summary</option>
                <option value="hostgrid"[% IF     style == 'grid'     && substyle == 'host' || style == 'hostgrid'     %] selected[% END %]>Grid</option>
              </optgroup>
              <optgroup label="Service">
                <option value="detail"[% IF          style == 'detail'          %] selected[% END %]>Detail</option>
                <option value="serviceoverview"[% IF style == 'overview' && substyle == 'service' || style == 'serviceoverview' %] selected[% END %]>Overview</option>
                <option value="servicesummary"[% IF  style == 'summary'  && substyle == 'service' || style == 'servicesummary'  %] selected[% END %]>Summary</option>
                <option value="servicegrid"[% IF     style == 'grid'    && substyle == 'service'  || style == 'servicegrid'     %] selected[% END %]>Grid</option>
              </optgroup>
              [% FOREACH groupname = additional_views.keys.sort %]
              <optgroup label="[% groupname %]">
                [% FOREACH optname = additional_views.$groupname.options.keys.sort %]
                [% opt = additional_views.$groupname.options.$optname %]
                <option value="[% opt.value %]"[% IF style == opt.value %] selected[% END %]>[% opt.name %]</option>
                [% END %]
              </optgroup>
              [% END %]
             </select>
           [% END %]
          </td>
          <td align="right">
            <input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/accept.png" style="display:[% IF loop.first %][% ELSE %]none[% END %];" name="update" id="[% paneprefix %][% prefix %]_btn_accept_search">
            <input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/minus.gif" style="display:[% IF loop.first %]none[% ELSE %][% END %];" name="delete" id="[% paneprefix %][% prefix %]_btn_del_search" onClick="deleteSearchPane(this.id)">
          </td>
          <td rowspan=99 align="center" class='newfilter' style="display:[% IF loop.last %][% ELSE %]none[% END %]; visibility:[% IF loop.last %]visible[% ELSE %]hidden[% END %]" onClick="new_filter('[% paneprefix %]filter_pane', '[% paneprefix %]all_filter_table', this.id)" id="[% paneprefix %][% prefix %]_new_filter">
            <img src="[% url_prefix %]thruk/themes/[% theme %]/images/right.png" alt="add new filter"><br>
            or
          </td>
        </tr>
<!-- HOST STATUS TYPES -->
        <tr>
          <td valign="top" align="left" class='filterName' nowrap>Host Status Types:</td>
          <td valign="top" align="left" class='filterValue' onclick="toggleFilterPaneSelector(this.id, 'hoststatustypes')" id="[% paneprefix %][% prefix %]_htn">[% search.host_statustype_filtername %]</td>
          <td>
            <div class="filter_pane" style="visibility:hidden;" id="[% paneprefix %][% prefix %]_hoststatustypes_pane">
            <div class="shadow"><div class="shadowcontent">
            <table border="1" class='filter' cellspacing="0" cellpadding="0">
              <tr>
                <td class='filter'>
                  <table border="0" cellspacing="2" cellpadding="0">
                    <tr>
                      <td valign="top" align="left" class='filterTitle filterDisplayTitle' nowrap>Host Status Types:</td>
                      <td align="right"><input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/accept.png" name="update" id="[% paneprefix %][% prefix %]_accept_ht" onclick="toggleFilterPaneSelector(this.id, 'hoststatustypes'); return false;"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_ht2n" onclick="toggleFilterCheckBox(this.id)">Up</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2" id="[% paneprefix %][% prefix %]_ht2" name="[% paneprefix %][% prefix %]_hoststatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_ht4n" onclick="toggleFilterCheckBox(this.id)">Down</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4" id="[% paneprefix %][% prefix %]_ht4" name="[% paneprefix %][% prefix %]_hoststatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_ht8n" onclick="toggleFilterCheckBox(this.id)">Unreachable</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8" id="[% paneprefix %][% prefix %]_ht8" name="[% paneprefix %][% prefix %]_hoststatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_ht1n" onclick="toggleFilterCheckBox(this.id)">Pending</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1" id="[% paneprefix %][% prefix %]_ht1" name="[% paneprefix %][% prefix %]_hoststatustype"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            </div></div>
            </div>
          </td>
        </tr>
<!-- HOST PROPERTIES -->
        <tr>
          <td valign="top" align="left" class='filterName' nowrap>Host Properties:</td>
          <td valign="top" align="left" class='filterValue' onclick="toggleFilterPaneSelector(this.id, 'hostprops')" id="[% paneprefix %][% prefix %]_hpn">[% search.host_prop_filtername %]</td>
          <td>
            <div class="filter_pane" style="visibility:hidden;" id="[% paneprefix %][% prefix %]_hostprops_pane">
            <div class="shadow"><div class="shadowcontent">
            <table border="1" class='filter' cellspacing="0" cellpadding="0">
              <tr>
                <td class='filter'>
                  <table border="0" cellspacing="2" cellpadding="0">
                    <tr>
                      <td valign="top" align="left" class='filterTitle filterDisplayTitle' nowrap>Host Properties:</td>
                      <td align="right"><input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/accept.png" name="update" id="[% paneprefix %][% prefix %]_accept_hp" onclick="toggleFilterPaneSelector(this.id, 'hostprops'); return false;"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp1n" onclick="toggleFilterCheckBox(this.id)">In Scheduled Downtime</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1" id="[% paneprefix %][% prefix %]_hp1" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2" id="[% paneprefix %][% prefix %]_hp2" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp2n" onclick="toggleFilterCheckBox(this.id)">Not In Scheduled Downtime</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp4n" onclick="toggleFilterCheckBox(this.id)">Has Been Acknowledged</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4" id="[% paneprefix %][% prefix %]_hp4" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8" id="[% paneprefix %][% prefix %]_hp8" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp8n" onclick="toggleFilterCheckBox(this.id)">Has Not Been Acknowledged</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp16n" onclick="toggleFilterCheckBox(this.id)">Checks Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16" id="[% paneprefix %][% prefix %]_hp16" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="32" id="[% paneprefix %][% prefix %]_hp32" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp32n" onclick="toggleFilterCheckBox(this.id)">Checks Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp64n" onclick="toggleFilterCheckBox(this.id)">Event Handler Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="64" id="[% paneprefix %][% prefix %]_hp64" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="128" id="[% paneprefix %][% prefix %]_hp128" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp128n" onclick="toggleFilterCheckBox(this.id)">Event Handler Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp256n" onclick="toggleFilterCheckBox(this.id)">Flap Detection Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="256" id="[% paneprefix %][% prefix %]_hp256" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="512" id="[% paneprefix %][% prefix %]_hp512" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp512n" onclick="toggleFilterCheckBox(this.id)">Flap Detection Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp1024n" onclick="toggleFilterCheckBox(this.id)">Is Flapping</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1024" id="[% paneprefix %][% prefix %]_hp1024" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2048" id="[% paneprefix %][% prefix %]_hp2048" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp2048n" onclick="toggleFilterCheckBox(this.id)">Is Not Flapping</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp4096n" onclick="toggleFilterCheckBox(this.id)">Notifications Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4096" id="[% paneprefix %][% prefix %]_hp4096" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8192" id="[% paneprefix %][% prefix %]_hp8192" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp8192n" onclick="toggleFilterCheckBox(this.id)">Notifications Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp16384n" onclick="toggleFilterCheckBox(this.id)">Passive Checks Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16384" id="[% paneprefix %][% prefix %]_hp16384" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="32768" id="[% paneprefix %][% prefix %]_hp32768" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp32768n" onclick="toggleFilterCheckBox(this.id)">Passive Checks Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp65536n" onclick="toggleFilterCheckBox(this.id)">Passive Checks</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="65536" id="[% paneprefix %][% prefix %]_hp65536" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="131072" id="[% paneprefix %][% prefix %]_hp131072" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp131072n" onclick="toggleFilterCheckBox(this.id)">Active Checks</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp262144n" onclick="toggleFilterCheckBox(this.id)">In Hard State</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="262144" id="[% paneprefix %][% prefix %]_hp262144" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="524288" id="[% paneprefix %][% prefix %]_hp524288" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp524288n" onclick="toggleFilterCheckBox(this.id)">In Soft State</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp1048576n" onclick="toggleFilterCheckBox(this.id)">In Check Period</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1048576" id="[% paneprefix %][% prefix %]_hp1048576" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2097152" id="[% paneprefix %][% prefix %]_hp2097152" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp2097152n" onclick="toggleFilterCheckBox(this.id)">Outside Check Period</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp4194304n" onclick="toggleFilterCheckBox(this.id)">In Notification Period</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4194304" id="[% paneprefix %][% prefix %]_hp4194304" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8388608" id="[% paneprefix %][% prefix %]_hp8388608" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp8388608n" onclick="toggleFilterCheckBox(this.id)">Outside Notification Period</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp16777216n" onclick="toggleFilterCheckBox(this.id)">Has Modified Attributes</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16777216" id="[% paneprefix %][% prefix %]_hp16777216" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="33554432" id="[% paneprefix %][% prefix %]_hp33554432" name="[% paneprefix %][% prefix %]_hostprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_hp33554432n" onclick="toggleFilterCheckBox(this.id)">No Modified Attributes</td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            </div></div>
            </div>
          </td>
        </tr>
<!-- SERVICE STATUS TYPES -->
[% IF substyle == 'service' %]
        <tr>
          <td valign="top" align="left" class='filterName' nowrap>Service Status Types:</td>
          <td valign="top" align="left" class='filterValue' onclick="toggleFilterPaneSelector(this.id, 'servicestatustypes')" id="[% paneprefix %][% prefix %]_stn">[% search.service_statustype_filtername %]</td>
          <td>
            <div class="filter_pane" style="visibility:hidden;" id="[% paneprefix %][% prefix %]_servicestatustypes_pane">
            <div class="shadow"><div class="shadowcontent">
            <table border="1" class='filter' cellspacing="0" cellpadding="0">
              <tr>
                <td class='filter'>
                  <table border="0" cellspacing="2" cellpadding="0">
                    <tr>
                      <td valign="top" align="left" class='filterTitle filterDisplayTitle' nowrap>Service Status Types:</td>
                      <td align="right"><input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/accept.png" name="update" id="[% paneprefix %][% prefix %]_accept_st" onclick="toggleFilterPaneSelector(this.id, 'servicestatustypes'); return false;"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_st2n" onclick="toggleFilterCheckBox(this.id)">Ok</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2" id="[% paneprefix %][% prefix %]_st2" name="[% paneprefix %][% prefix %]_servicestatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_st4n" onclick="toggleFilterCheckBox(this.id)">Warning</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4" id="[% paneprefix %][% prefix %]_st4" name="[% paneprefix %][% prefix %]_servicestatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName' id="[% paneprefix %][% prefix %]_st8n" onclick="toggleFilterCheckBox(this.id)">Unknown</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8" id="[% paneprefix %][% prefix %]_st8" name="[% paneprefix %][% prefix %]_servicestatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_st16n" onclick="toggleFilterCheckBox(this.id)">Critical</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16" id="[% paneprefix %][% prefix %]_st16" name="[% paneprefix %][% prefix %]_servicestatustype"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_st1n" onclick="toggleFilterCheckBox(this.id)">Pending</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1" id="[% paneprefix %][% prefix %]_st1" name="[% paneprefix %][% prefix %]_servicestatustype"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            </div></div>
            </div>
          </td>
        </tr>
<!-- SERVICE PROPERTIES -->
        <tr>
          <td valign="top" align="left" class='filterName' nowrap>Service Properties:</td>
          <td valign="top" align="left" class='filterValue' onclick="toggleFilterPaneSelector(this.id, 'serviceprops')" id="[% paneprefix %][% prefix %]_spn">[% search.service_prop_filtername %]</td>
          <td>
            <div class="filter_pane" style="visibility:hidden;" id="[% paneprefix %][% prefix %]_serviceprops_pane">
            <div class="shadow"><div class="shadowcontent">
            <table border="1" class='filter' cellspacing="0" cellpadding="0">
              <tr>
                <td class='filter'>
                  <table border="0" cellspacing="2" cellpadding="0">
                    <tr>
                      <td valign="top" align="left" class='filterTitle filterDisplayTitle'>Service Properties:</td>
                      <td align="right"><input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/accept.png" name="update" id="[% paneprefix %][% prefix %]_accept_sp" onclick="toggleFilterPaneSelector(this.id, 'serviceprops'); return false;"></td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp1n" onclick="toggleFilterCheckBox(this.id)">In Scheduled Downtime</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1" id="[% paneprefix %][% prefix %]_sp1" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2" id="[% paneprefix %][% prefix %]_sp2" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp2n" onclick="toggleFilterCheckBox(this.id)">Not In Scheduled Downtime</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp4n" onclick="toggleFilterCheckBox(this.id)">Has Been Acknowledged</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4" id="[% paneprefix %][% prefix %]_sp4" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8" id="[% paneprefix %][% prefix %]_sp8" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp8n" onclick="toggleFilterCheckBox(this.id)">Has Not Been Acknowledged</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp16n" onclick="toggleFilterCheckBox(this.id)">Active Checks Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16" id="[% paneprefix %][% prefix %]_sp16" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="32" id="[% paneprefix %][% prefix %]_sp32" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp32n" onclick="toggleFilterCheckBox(this.id)">Active Checks Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp64n" onclick="toggleFilterCheckBox(this.id)">Event Handler Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="64" id="[% paneprefix %][% prefix %]_sp64" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="128" id="[% paneprefix %][% prefix %]_sp128" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp128n" onclick="toggleFilterCheckBox(this.id)">Event Handler Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp512n" onclick="toggleFilterCheckBox(this.id)">Flap Detection Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="512" id="[% paneprefix %][% prefix %]_sp512" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="256" id="[% paneprefix %][% prefix %]_sp256" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp256n" onclick="toggleFilterCheckBox(this.id)">Flap Detection Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp1024n" onclick="toggleFilterCheckBox(this.id)">Is Flapping</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1024" id="[% paneprefix %][% prefix %]_sp1024" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2048" id="[% paneprefix %][% prefix %]_sp2048" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp2048n" onclick="toggleFilterCheckBox(this.id)">Is Not Flapping</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp4096n" onclick="toggleFilterCheckBox(this.id)">Notifications Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4096" id="[% paneprefix %][% prefix %]_sp4096" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8192" id="[% paneprefix %][% prefix %]_sp8192" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp8192n" onclick="toggleFilterCheckBox(this.id)">Notifications Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp16384n" onclick="toggleFilterCheckBox(this.id)">Passive Checks Disabled</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16384" id="[% paneprefix %][% prefix %]_sp16384" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="32768" id="[% paneprefix %][% prefix %]_sp32768" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp32768n" onclick="toggleFilterCheckBox(this.id)">Passive Checks Enabled</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp65536n" onclick="toggleFilterCheckBox(this.id)">Passive Checks</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="65536" id="[% paneprefix %][% prefix %]_sp65536" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="131072" id="[% paneprefix %][% prefix %]_sp131072" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp131072n" onclick="toggleFilterCheckBox(this.id)">Active Checks</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp262144n" onclick="toggleFilterCheckBox(this.id)">In Hard State</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="262144" id="[% paneprefix %][% prefix %]_sp262144" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="524288" id="[% paneprefix %][% prefix %]_sp524288" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp524288n" onclick="toggleFilterCheckBox(this.id)">In Soft State</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp1048576n" onclick="toggleFilterCheckBox(this.id)">In Check Period</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="1048576" id="[% paneprefix %][% prefix %]_sp1048576" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="2097152" id="[% paneprefix %][% prefix %]_sp2097152" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp2097152n" onclick="toggleFilterCheckBox(this.id)">Outside Check Period</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp4194304n" onclick="toggleFilterCheckBox(this.id)">In Notification Period</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="4194304" id="[% paneprefix %][% prefix %]_sp4194304" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="8388608" id="[% paneprefix %][% prefix %]_sp8388608" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp8388608n" onclick="toggleFilterCheckBox(this.id)">Outside Notification Period</td>
                    </tr>
                    <tr>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp16777216n" onclick="toggleFilterCheckBox(this.id)">Has Modified Attributes</td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="16777216" id="[% paneprefix %][% prefix %]_sp16777216" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterValueCheck'><input type="checkbox" value="33554432" id="[% paneprefix %][% prefix %]_sp33554432" name="[% paneprefix %][% prefix %]_serviceprop"></td>
                      <td valign="top" align="left" class='filterName clickable' id="[% paneprefix %][% prefix %]_sp33554432n" onclick="toggleFilterCheckBox(this.id)">No Modified Attributes</td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            </div></div>
            </div>
          </td>
        </tr>
[% END %]
<!-- SEARCH PATTERN -->
        [% FOR s = search.text_filter %]
        [% IF ! enable_shinken_features && s.type == 'priority' %]
          [% NEXT %]
        [% END %]
        <tr>
          <td class='filterValueInput' nowrap style="vertical-align: inherit;" colspan=2>
            <select name="[% paneprefix %][% prefix %]_type" id="[% paneprefix %][% prefix %]_[% loop.index %]_ts" onchange="verify_op(this.id)">
              <option value="search">Search</option>
              [% IF enable_shinken_features %]
              <option value="priority"[% IF s.type == 'priority' %] selected[% END %]>Business Impact</option>
              [% END %]
              <option value="check period"[% IF s.type == 'check period' %] selected[% END %]>Check Period</option>
              <option value="comment"[% IF s.type == 'comment' %] selected[% END %]>Comment</option>
              <option value="contact"[% IF s.type == 'contact' %] selected[% END %]>Contact</option>
              <option value="current attempt"[% IF s.type == 'current attempt' %] selected[% END %]>Current Attempt</option>
              <option value="custom variable"[% IF s.type == 'custom variable' %] selected[% END %]>Custom Variable</option>
              <option value="downtime duration"[% IF s.type == 'downtime duration' %] selected[% END %]>Downtime Duration</option>
              <option value="execution time"[% IF s.type == 'execution time' %] selected[% END %]>Execution Time</option>
              <option value="duration"[% IF s.type == 'duration' %] selected[% END %]>Duration</option>
              <option value="host"[% IF s.type == 'host' %] selected[% END %]>Host</option>
              <option value="hostgroup"[% IF s.type == 'hostgroup' %] selected[% END %]>Hostgroup</option>
              <option value="last check"[% IF s.type == 'last check' %] selected[% END %]>Last Check</option>
              <option value="latency"[% IF s.type == 'latency' %] selected[% END %]>Latency</option>
              <option value="next check"[% IF s.type == 'next check' %] selected[% END %]>Next Check</option>
              <option value="notification period"[% IF s.type == 'notification period' %] selected[% END %]>Notification Period</option>
              <option value="parent"[% IF s.type == 'parent' %] selected[% END %]>Parent</option>
              <option value="service"[% IF s.type == 'service' %] selected[% END %]>Service</option>
              <option value="servicegroup"[% IF s.type == 'servicegroup' %] selected[% END %]>Servicegroup</option>
              <option value="% state change"[% IF s.type == '% state change' %] selected[% END %]>% State Change</option>
            </select>[%# we don't want whitespaces here in final html but keep the nice source layout
            #%]<input type="text" name="[% paneprefix %][% prefix %]_val_pre" class="filter_pre_value" id="[% paneprefix %][% prefix %]_[% loop.index %]_val_pre" value="[% s.val_pre %]"[% IF 0 && use_ajax_search %][%# disabled for now #%] onclick="ajax_search.init(this, 'custom variable')"[% END %] style="[% IF s.type == 'priority' %]display: none; visibility: hidden;[% ELSE %]visibility: visible;[% END %]">[%#
            #%]<select name="[% paneprefix %][% prefix %]_op" id="[% paneprefix %][% prefix %]_[% loop.index %]_to" class="filter_op_select">
              <option value="~"[% IF  s.op == '~'  %] selected[% END %]>~</option>
              <option value="!~"[% IF s.op == '!~' %] selected[% END %]>!~</option>
              <option value="="[% IF  s.op == '='  %] selected[% END %]>=</option>
              <option value="!="[% IF s.op == '!=' %] selected[% END %]>!=</option>
              <option value="<="[% IF s.op == '<=' %] selected[% END %]>&lt;=</option>
              <option value=">="[% IF s.op == '>=' %] selected[% END %]>&gt;=</option>
            </select>[%#
            #%]<input type="text" name="[% paneprefix %][% prefix %]_value" id="[% paneprefix %][% prefix %]_[% loop.index %]_value" value="[% s.value %]"[% IF use_ajax_search %] onclick="ajax_search.init(this)"[% END %] style="[% IF s.type == 'priority' %]display: none; visibility: hidden;[% ELSE %]visibility: visible;[% END %]">
            <a id="[% paneprefix %][% prefix %]_[% loop.index %]_cal"[% IF s.type != 'last check' && s.type != 'next check' %] style="display:none; visibility: hidden;"[% END %] href="#" onclick="show_cal('[% paneprefix %][% prefix %]_[% loop.index %]_value')">
            <img src="[% url_prefix %]thruk/themes/[% theme %]/images/calendar.png" width="16" height="16" alt="pick date" class="cal_icon"></a>
            <select name="[% paneprefix %][% prefix %]_value_sel" id="[% paneprefix %][% prefix %]_[% loop.index %]_value_sel" style="[% IF s.type == 'priority' %]visibility: visible;[% ELSE %]display: none; visibility: hidden;[% END %]">
              [% FOREACH prio IN priorities.keys.sort.reverse %]
              <option value="[% prio %]"[% IF s.value == prio %] selected[% END %]>[% priorities.$prio %]</option>
              [% END %]
            </select>
          </td>


          <td class='newfilter' onclick="delete_filter_row(this); return false;"><input type="image" src="[% url_prefix %]thruk/themes/[% theme %]/images/remove.png" name="delete Filter">
            <script type="text/javascript">
            <!--
              verify_op("[% paneprefix %][% prefix %]_[% loop.index %]_ts");
            -->
            </script>
          </td>
        </tr>
        [% END %]
<!-- NEW FILTER -->
        <tr>
          <td colspan=3 class='newfilter' align="center" id="[% paneprefix %][% prefix %]_add_new_filter_button" onClick="add_new_filter(this.id, '[% paneprefix %]filterTable')">
            <img src="[% url_prefix %]thruk/themes/[% theme %]/images/down.png" alt="add new filter" style="vertical-align: middle"> and
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</td>
[% END %]
</tr></table>
[% IF show_form %]
</form>
[% END %]
