function confirmCode() {
	document.forms.membership.isPostBack.value = 0;
	document.forms.membership.submit();
}

function checkTAndC()
{
	var agreed = document.getElementById("AgreedToTAndC").checked;
	document.forms.membership.Save.disabled = !agreed;
}

function calculateSubscription()
{
	// Calculate a new subscription rate when the number of employees changes.
	var intIndex = document.forms.membership.TotalEmployees.selectedIndex;
	var objSubscriptionCost = document.getElementById("SubsCost");
	var objSubscription = document.forms.membership.Subscription;
	var objRegistration = document.forms.membership.Registration;
	var objTotal = document.forms.membership.Total;
	var objVAT = document.forms.membership.VAT;
	var objGrandTotal = document.forms.membership.GrandTotal;
	var strSubscriptionMessage = "";

	if (intIndex == 0)
	{
		objSubscriptionCost.innerHTML = "";
		objSubscription.value = "0.00";
		objRegistration.value = "0.00";
		objTotal.value = "0.00";
		objVAT.value = "0.00";
		objGrandTotal.value = "0.00";
	}
	else
	{
		strSubscriptionMessage = "&pound;" + arrSubscriptionRates[intIndex][0].toFixed(2) + " excluding VAT";
		if (arrSubscriptionRates[intIndex][1] != 0)
		{
			strSubscriptionMessage += " and one off joining fee of &pound;" + arrSubscriptionRates[intIndex][1].toFixed(2);
		}
		objSubscriptionCost.innerHTML = strSubscriptionMessage
		objSubscription.value = arrSubscriptionRates[intIndex][0].toFixed(2);
		objRegistration.value = arrSubscriptionRates[intIndex][1].toFixed(2);
		objTotal.value = (arrSubscriptionRates[intIndex][0] + arrSubscriptionRates[intIndex][1]).toFixed(2);
		objVAT.value = arrSubscriptionRates[intIndex][2].toFixed(2);
		objGrandTotal.value = (arrSubscriptionRates[intIndex][0] + arrSubscriptionRates[intIndex][1] + arrSubscriptionRates[intIndex][2]).toFixed(2);
	}
}
