<%@ LANGUAGE = JavaScript %>
<% /*
     $Revision$
     $Id$
*/ %>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<!-- #include file="../Shared/selector.inc" -->
<!-- #include file="../Shared/afdelingselector.inc" -->
<!-- #include file="../Shared/plaatsselector.inc" -->
<!-- #include file="alg.inc" -->

<%
FCLTHeader.Requires({ plugins:["jQuery", "kenmerk"] });

var regio_key = getQParamInt("regio_key", -1); //regio
var autosearch = getQParamInt("autosearch", 0) == 1;
var authparams = alg.checkAutorisation();
%>

<html>
  <head>
    <%  FCLTHeader.Generate(); %>
    <script type="text/javascript">
    $(document).ready(function() {<% if (autosearch) { %> document.forms.u2.submit(); <%}%> });
    </script>
  </head>
  <body id="searchbody">
    <div id="search">
      <form name="u2" target="workFrame" action="alg_regio_search_list.asp" method="get">
<%    BLOCK_START("searchtable", L("lcl_filterblok"));%>
          <tr>
            <td class="searchkolom1">
              <table><!-- x rijen, 2 kolommen: label + veld -->

<% //               <!-- Locatie, gebouw en verdieping -->
                    FCLTplaatsselector(authparams.ALGreadlevel, {
                                                                  regiokey: regio_key,
                                                                  startlevel: 0, // Regio
                                                                  eindlevel: 0, // District
                                                                  whenEmpty: L("lcl_search_generic")
                                                                });
%>
              </table>
            </td><!-- end column 1 -->

            <td class="searchkolom2">
            </td><!-- end column 1 -->
          </tr>

<%    BLOCK_END(); %>
<%
  var buttons =  [{title: L("lcl_search"), action: "document.forms.u2.submit();", id: "bSearch" }];
  CreateButtons(buttons, { entersubmit: true });
%>
      </form>
    </div> <!-- search -->

    <div id="result">
      <iframe width="100%" height="100%"
              src="../Shared/empty.asp"
              name="workFrame" id="workFrame"
              onload="FcltMgr.iframeLoaded(this)"
              frameborder="0" scrolling="no">
      </iframe>
    </div>
  </body>
</html>
