var form = null;
var button = null;
var command = null;
var commandInput = null;

function cancelProcess()
{
	commandInput.value = command;
	form.submit();	
	return false;
}

function registerCancelButton(formEl, buttonEl, commandStr, commandInputEl)
{
	form = formEl;
	button = buttonEl;
	command = commandStr;
	commandInput = commandInputEl;
	
	if (button != null)
	{
		button.onclick = cancelProcess;
	}
}