/*
     $Revision$
     $Id$

     File:          ctr_scenario.js
*/
function commit_scenario(key, table)
{
  FcltMgr.confirm( L("lcl_mjb_inst_scen") + "?",
                   { autoconfirm: false },
                   function() {
                                var data = { scenario: key };
                                protectRequest.dataToken(data);
                                $.post("../mjb/mjb_commit_scen.asp"
                                      , data
                                      , FcltCallbackClose
                                      , "json");
                              }
                 );
}

function copy_current(key, table)
{
  FcltMgr.confirm( L("lcl_mjb_copy_current") + "?",
                   { autoconfirm: false },
                   function() {
                                var data = { scen_key: key,
                                             totalcopy: 1 };
                                protectRequest.dataToken(data);
                                $.post("../mjb/mjb_incl_scen_save.asp"
                                      , data
                                      , FcltCallbackClose
                                      , "json");
                              }
                 );
}

function scf_mjb_console(row)
{
  var key = row.getAttribute("ROWKEY");
  FcltMgr.openDetail("appl/mjb/mjb_search.asp?scenario=" + key, L("lcl_mjb_console"));
}
