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

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

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

var urole = getQParamSafe("urole");
var fronto = urole == "fo";
var backo = (urole == "bo");
var minfo = (urole == "mi");
var frontend = (urole == "fe" || (!fronto & !backo & !minfo));

var date_on = new Date();

var regio_key = getQParamInt("regio_key", -1);
var district_key = getQParamInt("district_key", -1);
var locatie_key = getQParamInt("locatie_key", -1); // Als geen input en wel eigen werkplek dan eigen locatie
var gebouw_key = getQParamInt("gebouw_key", -1);
var verdieping_key = getQParamInt("verdieping_key", -1);

var host_key = getQParamInt("host_key", -1);

autfunction = "WEB_MSGBOF";
var authparams = user.checkAutorisation(autfunction);
%>

<html>
  <head>
<%  FCLTHeader.Generate(); %>
  </head>

  <body id="searchbody">
    <div id="search">
<%    BLOCK_START("searchtable", L("lcl_filterblok"));%>
      <form name="u2" target="workFrame" action="msg_search_list.asp" method="get">
        <tr>
          <td class="searchkolom1">
            <table>
              <tr>
                <td class="label"><label for="searchtext"><%=L("lcl_msg_search_text")%>:</label></td>
                <td><input type="text" class="fldsrch" name="searchtext" value=""></td>
              </tr>
            </table>
          </td>
          <td class="searchkolom2">
            <table>
<%
                  FCLTplaatsselector(authparams.PRSreadlevel, {
                                                                locatiekey: locatie_key,
                                                                gebouwkey: gebouw_key,
                                                                startlevel: 1, // district
                                                                eindlevel: 3, // gebouw
                                                                whenEmpty: L("lcl_search_generic")  // want filter
                                                              });
%>
            </table>
          </td><!-- end column 2-->
        </tr>
      </form>
<%    BLOCK_END();
  var buttons =  [ {title: L("lcl_search"), action:"document.forms.u2.submit();", id:"bSearch" } ];
  CreateButtons(buttons, { entersubmit: true });
%>
    </div>
    <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>
