
var DEL_MSSG = "Your selection will be permanently deleted, OK?"
function delObj(message, event, formClass, id, errorAction, action) {
return postHidden(action, errorAction, event, id, formClass, message, null);
}
function delAndPersist(formName, message, event, formClass, id, errorAction, action) {
return persistGet(formName, action, errorAction, event, id, formClass, message, null);
}

function moveObj(event, id, newParent, action, errorAction, formClass) {
if(event == null) event = 'commit';
return postHidden(action, errorAction, event, id, formClass, null, newParent);
}

function postHidden(action, errorAction, event, id, formClass, message, ancestorId) {
if (message == null || message.length == 0 || confirm(message)) {
var form = document.forms.hiddenForm;
if(formClass != null)
form._postFormClass.value = formClass;
if(id != null)
form._postId.value = id;
if(ancestorId != null)
form._postAncestorId.value = ancestorId;
if(errorAction != null)
form._postErrorAction.value = errorAction;
if(event != null)
form._postEvent.value = event;
if(action != null)
form.action = action;
setTimeout("document.forms.hiddenForm.submit()", 100);
}
return void(null);
}
function persistGet(formName, action, errorAction, event, id, formClass, message, ancestorId) {
if (message == null || message.length == 0 || confirm(message)) {
if(action == null){
action = document.location.href;
if(action.indexOf("?") != -1){
action = action.substring(0, action.indexOf("?"));
}
}
if(formClass != null)
action = addParam(action, '_formClass', formClass);
if(id != null)
action = addParam(action, '_id', id);
if(ancestorId != null)
action = addParam(action, '_ancestorId', ancestorId);
if(errorAction != null)
action = addParam(action, '_errorAction', errorAction);
if(event != null)
action = addParam(action, '_event', event);
submitForm(formName, 'persist', action);
}
return void(null);
}
function addParam(action, param, value){
return action + ((action.indexOf("?") == -1) ? "?" : "&") + escape(param) + "=" + escape(value);
}
var _SR_;
if(_SR_ != null) _SR_.notify("hiddenpost.jsp");