function doConfirmActionDeleteElement(pMsg, pRoom, pIndex) {
  loadPageConfirm(pMsg, '&page=elements&action=delete&index=' + pIndex + '&room=' + pRoom);
}

function doConfirmActionDeleteLocation(pMsg) {
  if (formByName('index').elements['index'].selectedIndex > 0 && confirm(pMsg))
    submitAndAction('index', 'delete');
}

function doConfirmActionDeleteRoom(pMsg, pIndex) {
  loadPageConfirm(pMsg, '&action=delete&index=' + pIndex);
}

function doConfirmActionDeleteShelf(pMsg) {
  doConfirmActionDeleteLocation(pMsg);
}

function doConfirmActionDeleteType(pMsg) {
  doConfirmActionDeleteLocation(pMsg);
}

function doPopupActionMove(pRoom, pIndex, pSubIndex) {
  goOpener('index.php?umi=erp_archive&page=elements&action=move&index=' + pIndex + '&room=' + pRoom + '&subindex=' + pSubIndex);
  window.close();
}

function popupHistoryElement(pIndex) {
  popupWindow('plain.php?page=history.pop&entity=erp_archive_elements&index=' + pIndex, 240, 500);
}

function popupHistoryRoom(pIndex) {
  popupWindow('plain.php?page=history.pop&entity=erp_archive_rooms&index=' + pIndex, 240, 500);
}

function popupMove(pIndex) {
  popupWindow('plain.php?umi=erp_archive&page=move.pop&index=' + pIndex, 280, 220);
}