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

    File:           fac_faq.asp
    Status:
    Description:    wrapper voor faq bewerk / show

    Parameters:     faq_key

    Context:
    Note:

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

<%
FCLTHeader.Requires({plugins:["jQuery", "suggest"], js: ["jquery-ui.js"]})


  var faq_key = getQParamInt("faq_key", -1);
  var fac_title = "";
%>
<html>
<head>
<%
   FCLTHeader.Generate();
%>
  <script type="text/javascript" >
      <% if (faq_key > 0) { %>
        FcltMgr.setTitle("<%=safe.jsstring(fac_title)%>", {hot:false});
      <% } %>

      function facClose(params)
      {
          <% if (faq_key == -1)
             { %>
              if (params.cancel)
              {
                  FcltMgr.closeDetail(window, params );
                  return true;
              }
              if (!params.keepForm)
                  window.location.href = "fac_faq.asp?verynew=1&faq_key=" + params.faq_key;
          <% } else { /* Bestaand object bewerkt, switch naar show-mode */ %>
              if (params.close)
              {
                FcltMgr.closeDetail(window, { close: true})
              }
              if (!params.keepForm && !params.deleted)
                  $("#facFrame")[0].src = "fac_show_faq.asp?faq_key=<%=faq_key%>";
          <% } %>
      }
    </script>
</head>

<body>
<%
if (faq_key == -1)
{
    var page="fac_edit_faq.asp"; // Maak een nieuw
    IFRAMER("facFrame", page, { FcltClose: "facClose" } );
}
else
{
    var page="fac_show_faq.asp";
    page += "?faq_key=" + faq_key;
    IFRAMER("facFrame", page, { FcltClose: "facClose" } );

    page="fac_stdmelding_list.asp";
    page += "?faq_key=" + faq_key;
    IFRAMER("facstdmeldingFrame", page, {FcltClose: "facClose" });
}
%>
</body>
</html>
