<!--
	/*
		DO NOT REMOVE - Called by Flash to accept the selected seats string (colon-separated)
	*/
	function selectedSeatsAndContinue() 
	{
		window.location = '/buy/products.php';			
	}
	
	function deleteProduct(iSeatId, iProductId) 
	{
		if (confirm("Are you sure you wish to delete this add-on from your basket?")) {
			window.location = '/buy/products.php?sMode=deleteProduct&iProductId=' + iProductId + '&iSeatId=' + iSeatId;
		}
	}
	function chkDeleteFriend(iFriendId) {
		if (confirm("Are you sure you wish to delete this friend from your Falkirk Online profile?")) 
		{
			window.location = '/profile/friends.php?sMode=deleteFriend&iFriendId=' + iFriendId;
		}
	}
	function returnToGames(iProductId) 
	{
		window.location = '/buy/games.php?iProductId=' + iProductId;
	}
	function setFocus(sForm, sField) 
	{
		var oForm;
		if (document.getElementById)
		{
			oForm = document.getElementById(sForm);
		} 
		else if (document.forms)
		{
			oForm = document.forms[sForm];
		}
		if (oForm) 
		{
			var oField = eval('oForm.' + sField);
			if (oField) {
				oField.focus();
			}
		}
	}
	
	function showHideAgeGroups(iAgeGroupId, sFieldName)
	{
		var oField;
		if (document.getElementById)
		{
			oField = document.getElementById(sFieldName);
		} 
		else if (document.forms)
		{
			oForm = document.forms['fBasket'];
			if (oForm)
			{
				oField = eval(oForm + '.' + oFieldName);
			}
		}
		
		if (oField) 
		{
			if (iAgeGroupId == undefined || iAgeGroupId == -1)
			{
				oField.style.display = '';
			}
			else
			{
				oField.style.display = 'none';
			}	
		}
	}
	
	function setFocusLogin() 
	{
		var oForm;
		if (document.getElementById)
		{
			oForm = document.getElementById('login');
		} 
		else if (document.forms)
		{
			oForm = document.forms['login'];
		}
		if (oForm) 
		{
			var oField = eval('oForm.sCustNum');
			if (oField.value != '') {
				oField = eval('oForm.sPassword');
				if (oField) oField.focus();
			} else oField.focus();
		}
	}
	
	function selectSeats(iRow) 
	{
		try {
			var oForm = document.forms['fSelectGame'];

			if (document.getElementById) {
				var aGames = oForm.elements['iProductId'];
				if (aGames) {
					iRow = aGames.length;
		
					if (iRow >= 0) {
						window.location = '/buy/seats.php?iProductId=' + aGames[iRow - 1].value;
					} else {
						//Just one, no array of items
						if (aGames.checked == true) 
						{
							window.location = '/buy/seats.php?iProductId=' + aGames.value;
						} else if (document.getElementById('divMsg')) 
						{
							document.getElementById('divMsg').style.display = 'inline';
						}
					}
				}
			} 
		
		} catch (e) {alert(e);}	

	}
	
	//basket functions
	function viewBasket() 
	{
		window.location = '/basket/products.php';
	}
	
	//basket functions
	function clearBasket() 
	{
		if (confirm("Are you sure you wish to empty your basket?")) {
			window.location = '/basket/products.php?sMode=clearBasket';
		}
	}
//-->
