// =======================================================
// ===  General helper methods                         ===
// =======================================================
function SetElementValue(theElement, theValue) 
{
	document.getElementById(theElement).value = theValue;
}

function SubmitForm(formName)
{
	document.forms[formName].submit();
}

function GoTo(page)
{
	document.location.href = page;
}

function ConfirmGoTo(page, $msg)
{
	if (confirm($msg)) 
		document.location.href = page;
}

function OpenGoTo(page)
{
	window.open(page);
}

// =======================================================
// ===  Action specific methods                        ===
// =======================================================

function MarkTicketAsPaid(transactionid) 
{
	if (confirm("Really mark this ticket as paid?"))
	{
		SetElementValue('transactionid', transactionid);
		SubmitForm('confirmpaidticket');
	}
}
