function selectCard(card,f) {
	if (card=="visa") f.transactionamount.value="83.20";
	if (card=="access") f.transactionamount.value="83.20";
	if (card=="delta") f.transactionamount.value="80.00";
	if (card=="switch") f.transactionamount.value="80.00";	
}


function validateContracts(f) { 
	if (isBlank(f.name.value)) {
		alert("Please enter your name");
		f.name.focus();
		return false;
	}
	if (isBlank(f.membershipno.value)) {
		alert("Please enter your membershipno");
		f.membershipno.focus();
		return false;
	}
	if (isBlank(f.dob.value)) {
		alert("Please enter your date of birth");
		f.dob.focus();
		return false;
	}	
	if (f.chest.selectedIndex==0) {
		alert("Please enter your chest size");
		f.chest.focus();
		return false;
	}
	if (isBlank(f.address1.value)) {
		alert("Please complete your address field 1");
		f.address1.focus();
		return false;
	}
	if (isBlank(f.town.value)) {
		alert("Please enter your town");
		f.town.focus();
		return false;
	}
	if (isBlank(f.postcode.value)) {
		alert("Please enter your postcode");
		f.postcode.focus();
		return false;
	}	
	if (!isPostcode(f.postcode.value)) {
		alert("Please enter a valid postcode");
		f.postcode.focus();
		return false;
	}
	if (isBlank(f.tel_day.value)) {
		alert("Please enter your daytime telephone number");
		f.tel_day.focus();
		return false;
	}
	if (isBlank(f.email_address.value)) {
		alert("Please enter your email address");
		f.email_address.focus();
		return false;
	}
	if (!isEmail(f.email_address.value)) {
		alert("You have entered an invalid email address");
		f.email_address.focus();
		return false;
	}
	if (f.soccer_camp.selectedIndex==0) {
		alert("Please enter the soccer camp");
		f.soccer_camp.focus();
		return false;
	}
	if (!f.terms.checked) {
		alert("In order to continue you will need to accept the terms & conditions on behalf of the above applicant for his/her place on Ian St John Soccer Camp");
		f.terms.focus();
		return false;
	}
	if ((!f.q1[0].checked)&&(!f.q1[1].checked)) {
		alert("Please mark an answer to question one");
		f.q1[0].focus();
		return false;		
	}
	if ((!f.q2[0].checked)&&(!f.q2[1].checked)) {
		alert("Please mark an answer to question two");
		f.q2[0].focus();
		return false;		
	}
	if ((!f.q3[0].checked)&&(!f.q3[1].checked)) {
		alert("Please mark an answer to question three");
		f.q3[0].focus();
		return false;		
	}
	if ((!f.q4[0].checked)&&(!f.q4[1].checked)) {
		alert("Please mark an answer to question four");
		f.q4[0].focus();
		return false;		
	}
	if ((!f.q5[0].checked)&&(!f.q5[1].checked)) {
		alert("Please mark an answer to question five");
		f.q5[0].focus();
		return false;		
	}
	if ((!f.q6[0].checked)&&(!f.q6[1].checked)) {
		alert("Please mark an answer to question six");
		f.q6[0].focus();
		return false;		
	}
	if (!f.medical1.checked) {
		alert("In order to continue you will need to confirm that in the event that the child requires any ongoing medication, inhalers, or other medical support, Soccer Camps will not be responsible for the supply or administration of any medication and that is the responsibility of the child/parent/guardian.");
		f.medical1.focus();
		return false;
	}
	if (!f.medical2.checked) {
		alert("In order to continue you will need to confirm that in the unlikely event of the child requiring first aid or emergency treatment Ian St John Soccer Camps are duly authorised to provide first aid and arrange any necessary emergency medical treatment.");
		f.medical2.focus();
		return false;
	}
	if ((!f.cardtype[0].checked)&&(!f.cardtype[1].checked)&&(!f.cardtype[2].checked)&&(!f.cardtype[3].checked)) {
		alert("Please select a card type");
		f.cardtype[0].focus();
		return false;		
	}
	if (isBlank(f.card_name.value)) {
		alert("Please enter the cardholders name");
		f.card_name.focus();
		return false;
	}
	if (isBlank(f.card_no.value)) {
		alert("Please enter the card number");
		f.card_no.focus();
		return false;
	}	
}