function validateFeedback(whichForm){ 
	feedbackStr = "";
	checkForm(whichForm);
	if (feedbackStr != ""){
		feedbackStr = "Your Application could not be accepted for the following reasons:\n" + feedbackStr
		alert(feedbackStr);
		return false;
	}else{
		return true;
		//alert("returning true");
	}
}

//Validation - to ensure all input boxes have been filled in correctly
function checkForm(whichForm){ 
	
		whichForm.cccuSport.style.background 				= "white";
		whichForm.sport.style.background 					= "white";
		whichForm.cricket.style.background 					= "white";
		whichForm.rugby.style.background 					= "white";
		whichForm.hockey.style.background 					= "white";
		whichForm.hockey2.style.background 					= "white";
		whichForm.hockey3.style.background 					= "white";
		whichForm.ambassador.style.background 				= "white";
		whichForm.tennis.style.background 					= "white";

		whichForm.degree.style.background 					= "white";
		whichForm.ucas.style.background 					= "white";
		whichForm.surname.style.background 					= "white";
		whichForm.forename.style.background 				= "white";
		whichForm.nationality.style.background 				= "white";
		whichForm.addresshome.style.background 				= "white";
		whichForm.addressterm.style.background 				= "white";
		whichForm.telephone.style.background 				= "white";
		whichForm.email.style.background 					= "white";
		whichForm.honours.style.background 					= "white";
		whichForm.training.style.background 				= "white";
		whichForm.performance.style.background 				= "white";
		whichForm.ambitions.style.background 				= "white";
		whichForm.costs.style.background 					= "white";
		whichForm.support.style.background 					= "white";
		whichForm.contribution.style.background 			= "white";
		whichForm.reference1.style.background 				= "white";
		whichForm.reference2.style.background 				= "white";
		whichForm.hearabout.style.background 				= "white";


var NewCount = 0

if (whichForm.cccuSport.checked == false)
{NewCount = NewCount + 1 }

if (whichForm.cricket.checked == false)
{NewCount = NewCount + 1}

if (whichForm.rugby.checked == false)
{NewCount = NewCount + 1}

if (whichForm.hockey.checked == false)
{NewCount = NewCount + 1}

if (whichForm.hockey2.checked == false)
{NewCount = NewCount + 1}

if (whichForm.hockey3.checked == false)
{NewCount = NewCount + 1}

if (whichForm.ambassador.checked == false)
{NewCount = NewCount + 1}

if (whichForm.tennis.checked == false)
{NewCount = NewCount + 1}



if (NewCount == 8)
{
feedbackStr = feedbackStr + "Please enter a scholarship  \n";
whichForm; return false;
}



	

	if ((whichForm.sport.value == "") && (whichForm.cccuSport.checked == true)){
		feedbackStr = feedbackStr + "You must type in your sport(s) if you have ticked CCCU Sport Scholarship \n";
		whichForm.sport.style.background = "yellow";
	}	

	
	
	
	if ((whichForm.degree.value == "") || (whichForm.degree.value == " ")){
		feedbackStr = feedbackStr + "Please enter degree programme \n";
		whichForm.degree.style.background = "yellow";
	}	

	if ((whichForm.ucas.value == "") || (whichForm.ucas.value == " ")){
		feedbackStr = feedbackStr + "Please enter your UCAS number \n";
		whichForm.ucas.style.background = "yellow";
	}	
	
	if ((whichForm.surname.value == "") || (whichForm.surname.value == " ")){
		feedbackStr = feedbackStr + "Please enter your Surname \n";
		whichForm.surname.style.background = "yellow";
	}
	
	if ((whichForm.forename.value == "") || (whichForm.forename.value == " ")){
		feedbackStr = feedbackStr + "Please enter your Forename \n";
		whichForm.forename.style.background = "yellow";
	}		


	if ((whichForm.dob.value == "") || (whichForm.dob.value == " ")){
		feedbackStr = feedbackStr + "Please enter your date of birth \n";
		whichForm.dob.style.background = "yellow";
	}	


	if ((whichForm.nationality.value == "") || (whichForm.nationality.value == " ")){
		feedbackStr = feedbackStr + "Please enter your nationality \n";
		whichForm.nationality.style.background = "yellow";
	}	





// Nominee Validatiion

	if ((whichForm.addresshome.value == "") || (whichForm.addresshome.value == " ")){
		feedbackStr = feedbackStr + "Please enter your home address \n";
		whichForm.addresshome.style.background = "yellow";
	}		
	
	if ((whichForm.telephone.value == "") || (whichForm.telephone.value == " ")){
		feedbackStr = feedbackStr + "Please enter your telephone  \n";
		whichForm.telephone.style.background = "yellow";
	}		

	if ((whichForm.email.value == "") || (whichForm.email.value == " ")){
		feedbackStr = feedbackStr + "Please enter your email address \n";
		whichForm.email.style.background = "yellow";
	}
	
	if ((whichForm.honours.value == "") || (whichForm.honours.value == " ")){
		feedbackStr = feedbackStr + "Please enter your honours details \n";
		whichForm.honours.style.background = "yellow";
	}

	
	
	if ((whichForm.training.value == "") || (whichForm.training.value == " ")){
		feedbackStr = feedbackStr + "Please enter your training details \n";
		whichForm.training.style.background = "yellow";
	}			


	if ((whichForm.performance.value == "") || (whichForm.performance.value == " ")){
		feedbackStr = feedbackStr + "Please enter your performance details \n";
		whichForm.performance.style.background = "yellow";
	}		


	if ((whichForm.ambitions.value == "") || (whichForm.ambitions.value == " ")){
		feedbackStr = feedbackStr + "Please enter your ambitions \n";
		whichForm.ambitions.style.background = "yellow";
	}		

	
	if ((whichForm.costs.value == "") || (whichForm.costs.value == " ")){
		feedbackStr = feedbackStr + "Please enter cost details \n";
		whichForm.costs.style.background = "yellow";
	}	

	
	if ((whichForm.support.value == "") || (whichForm.support.value == " ")){
		feedbackStr = feedbackStr + "Please enter support details \n";
		whichForm.support.style.background = "yellow";
	}	

	if ((whichForm.contribution.value == "") || (whichForm.contribution.value == " ")){
		feedbackStr = feedbackStr + "Please enter the contributions field \n";
		whichForm.contribution.style.background = "yellow";
	}	

	if ((whichForm.reference1.value == "") || (whichForm.reference1.value == " ")){
		feedbackStr = feedbackStr + "Please enter reference No 1 \n";
		whichForm.reference1.style.background = "yellow";
	}	


	if ((whichForm.reference2.value == "") || (whichForm.reference2.value == " ")){
		feedbackStr = feedbackStr + "Please enter reference No 2 \n";
		whichForm.reference2.style.background = "yellow";
	}	



	if ((whichForm.hearabout.value == "") || (whichForm.hearabout.value == " ")){
		feedbackStr = feedbackStr + "Please say where you heard about the Sports Scholarships \n";
		whichForm.hearabout.style.background = "yellow";
	}	






}



