<%@language = "javascript" %>
<% /*
    $Revision$
    $Id$

    File:        ins_history_search.asp
    Status:
    Description: Toont object tracking (bijvoorbeeld meterstanden)
    Parameters:  ??
    Context:     Via URL
    Note:

*/
%>

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

<%
FCLTHeader.Requires({plugins:["jQuery"], js: ["jquery-ui.js"]});
var urole      = getQParamSafe("urole", "fe");
var insdeelkey = getQParamInt("ins_key");
var autosearch = getQParamInt("autosearch", 1) == 1;

// De functie checkAutorisation(autfunction) geeft een Response.End indien er geen autorisatie voor autfunction wordt gevonden
var autfunction = urole == "fo"? "WEB_INSFOF" : "WEB_INSMAN";
var authparams = user.checkAutorisation(autfunction);
%>
<html>
  <head>
<% FCLTHeader.Generate() %>
    <script type="text/javascript">
<%    if (autosearch) { %>
				$(document).ready(function() {doSubmit()})
<%  	} %>

      function doSubmit()
      {
        document.forms.u2.submit();
      }
    </script>
  </head>
  <body id="searchbody">

    <div id="search">
      <form name="u2" method="get" action="ins_history_list.asp" target="workFrame">
        <input type="hidden" name="urole" value="<%=urole%>">
        <input type="hidden" name="ins_key" value="<%=insdeelkey%>">
<%      BLOCK_START("searchtable", L("lcl_filterblok"));
        var since = new Date;
        FCLTcalendar("date_from",
                      { label: "Vanaf",
                        initEmpty: 1,
                        trclass: "primsearch",
                        volgnr: 1
                      });
        BLOCK_END();
        var buttons =  [ {title: L("lcl_search"), action: "doSubmit()" } ];
        CreateButtons(buttons, { entersubmit: true });
%>
      </form>
    </div>
    </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>