function xsl_button_click(link,submit, formName, commandName, command, commandArgumentName, commandArgument)
{
	if(submit == 'true')
	{
		theform = document.getElementById(formName);
		if ( theform)
		{
			commandField = document.getElementById(commandName);
			if ( commandField)
			{
				commandField.value = command;
			}
			commandArgumentField = document.getElementById(commandArgumentName);
			if ( commandArgumentField)
				commandArgumentField.value = commandArgument;
			theform.submit();
		}
		else
		{
			alert("An error occurred.");
		}
	}
	else
	{
		window.location.href = link;
	}
}