/*
     $Revision$
     $Id$
*/

function sleEdit(row)
{
  var ins_key = row.getAttribute("ROWKEY");
  var url = "appl/ins/ins_deel.asp?ins_key=" + ins_key
          + "&urole=bo";
  FcltMgr.openDetail(url, "");
}

function sleCheckOut(row)
{
  var ins_key = row.getAttribute("ROWKEY");
  FcltMgr.openDetail("appl/ins/ins_deel_free.asp?ins_key=" + ins_key, L("lcl_ins_lend_out"), {callback: refreshall});
}

function refreshall(data)
{
  if (data.refresh)
    window.location.reload();
}

function sleCheckIn(row)
{
  $(row).addClass('dirty');
  var ins_key = row.getAttribute("ROWKEY");
  FcltMgr.openDetail("appl/ins/ins_deel_free.asp?ins_key=" + ins_key, L("lcl_ins_insinn"), {callback: refreshall});
}

function sleDelete(rowArray, isMulti)
{
  FcltMgr.confirm(L("lcl_sle_issuance_item"), { autoconfirm: isMulti }, function() {
      var insKeyString = getKeyString(rowArray);
      $.post("../ins/ins_delete.asp", {
              key: insKeyString,
              level: "D"
          },
          FcltCallbackRefresh,
          "json");
  });
}