// v 1.1 November 2007

var bNotified=false;

function preflightCheck(target)	{
	var myForm=document.getElementById("frmList");
	if (bNotified)
		{	myForm.action="trolley.asp?action=update"	}
	else	{
		if (target.length)
			{	myForm.action="https://www.reflexcd.co.uk/secure/checkout.asp?action="+target	}
		else
			{	myForm.action="https://www.reflexcd.co.uk/secure/checkout.asp"	}
	}
	myForm.submit()
}

function updateTrolley(anItem)	{
	if (!bNotified)	{
		alert("Your totals will be updated \nwhen you've finished ");
		bNotified=true;
		document.getElementById("cmdCheckout").value="Update trolley";
		document.getElementById("cmdOneClick").disabled="true";
	}
}

function cancelTrolley()	{
var sMsg;
var bResponse;
var myForm=document.getElementById("frmList");

	sMsg = "Remove all trolley contents?";
	bResponse = confirm(sMsg);

	if (bResponse)	{
		// cancel order
		myForm.action="trolley.asp?action=cancel";
		myForm.submit();
	}
}