/*
     $Revision$
     $Id$
*/

function sleEdit(row)
{
  var ins_srtdeel_key = row.getAttribute("ROWKEY");
  var sleData = eval('(' + row.getAttribute("ROWDATA") + ')');
  if (sleData)
  {
    var sleSrtGroepKey = sleData.sleSrtGroepKey;
    var url = "appl/sle/sle_srtdeel.asp?ins_srtdeel_key=" + ins_srtdeel_key;
    FcltMgr.openDetail(url, L("lcl_sle_objectsoorten"));
  }
}

function sleSleutelCilinder(rowArray)
{
  var slecilArr = [];
  var iniType = "";
  for (var i = 0; i < rowArray.length; i++)
  {
    var sleData = eval('(' + rowArray[i].getAttribute("ROWDATA") + ')');
    if (sleData)
    {
      if (i == 0)
        iniType = sleData.sletype;
      else
      {
        if (iniType != sleData.sletype)
        {
          FcltMgr.alert(L("lcl_sle_one_srtgroep_only"));
          return;
        }
      }
      slecilArr.push(rowArray[i].getAttribute("ROWKEY"))
    }
  }
  FcltMgr.openModalDetail("sle_sleutelcilinder.asp?slecil_keys=" + slecilArr.join(","), L("lcl_sle_slecil_kopppeling"));
}
