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

    File:           fac_bookmark.asp
    Status:
    Description:    wrapper voor bookmark bewerk / show

    Parameters:     bkm_id (bookmark id)

    Context:
    Note:

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

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

var bkm_id = getQParam("bkm_id", "");
var bkm_title = "";
%>

<html>
  <head>
<%  FCLTHeader.Generate(); %>
    <script type="text/javascript" >
<%    if (bkm_id != "")
      { %>
        FcltMgr.setTitle("<%=safe.jsstring(bkm_title)%>", {hot: false});
<%    } %>

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

  <body>
<% PAGE_START();
 if (bkm_id == "")
      var page="fac_edit_bookmark.asp"; // Maak een nieuw
    else
      var page="fac_show_bookmark.asp";
    page += "?bkm_id=" + bkm_id;

    IFRAMER("bkmFrame", page, { FcltClose: "bkmClose", title: L("lcl_fac_bookmark")} );
PAGE_END();%>
  </body>
</html>
<% ASPPAGE_END(); %> 
