function doEdit(button, stofId)
{
   button.form.stof_id.value = stofId;
   button.form.command.value = "edit";
   button.form.action = "edit_stof.php";
   button.form.submit();
}

function doAdd(button)
{
   button.form.stof_id.value = -1;
   button.form.command.value = "add";
   button.form.action = "edit_stof.php";
   button.form.submit();
}

function doDelete(button, stofId)
{
   var message = "Hierdoor verwijdert u dit record permanent!\r\n" +
                 "Bent u zeker?";

   var proceed = confirm(message);

   if(proceed)
   {
      button.form.stof_id.value = stofId;
      button.form.command.value = "delete";
      button.form.submit();
   }
}

function doCancel(button)
{
   button.form.command.value = "view";
   button.form.action = "index_stoffen.php";
   button.form.submit();
}

function doSave(button, command)
{
   button.form.command.value = command;
   button.form.submit();
}

