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

    File:               bes_artikel.asp
    Description:        Wrapper for bes_show_srtprod.asp/bes_edit_srtprod.asp

    Parameters:         srtprod_key, optional

    Context:
    Note:

*/ %>
<!--#include file="../Shared/common.inc" -->
<!--#include file="../Shared/iface.inc" -->
<%
  FCLTHeader.Requires({plugins:["suggest","jQuery"], js: ["jQuery-ui.js"]})
// jQuery-ui.js is nodig in het child formulier bes_artikelwerkplek_search_list

  var authparams = user.checkAutorisation("WEB_BESMSU");

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

%>
<html>
<head>
<%
   FCLTHeader.Generate();
%>
  <script  type="text/javascript" >
<%    if (srtprod_key == -1) { %>FcltMgr.startEdit(window);<% } %>
      function besClose(params)
      {
          <% if (srtprod_key == -1)
             { %>
              if (params.cancel)
              {
                  FcltMgr.closeDetail(window, params );
                  return true;
              }
              if (!params.keepForm)
                  window.location.href = "bes_srtprod.asp?verynew=1&key=" + params.srtprod_key;
          <% } else { %>
              if (params.close)
              {
                FcltMgr.closeDetail(window, { close: true})
              }
              if (!params.keepForm)
                  $("#besFrame")[0].src = "bes_show_srtprod.asp?srtprod_key=<%=srtprod_key%>";

          <% } %>
      }
    </script>
</head>

<body>
<%
    if (srtprod_key == -1)
        var page="bes_edit_srtprod.asp"; // Maak een nieuw
    else
        var page="bes_show_srtprod.asp?srtprod_key="+srtprod_key;

    IFRAMER("besFrame", page, { FcltClose: "besClose", initHeight: 250 } );

  if (srtprod_key  > -1)
  {
    page = "bes_srtprod_prijs_list.asp?embedded=1&srtprod_key=" + srtprod_key;
    IFRAMER("besPrijsFrame", page, { refreshOnClose: true } );
  }
%>
</body>
</html>
