function submitChecker(theForm){
	var msg=new String();
	
	if (!gotData(theForm.name.value)){
		msg+=("A contact name is required\n\n");
		
	}
	if (!gotData(theForm.telephone.value)){
		msg+=("A telephone number is required\n\n");
		
	}
	if (!gotData(theForm.email.value)){
		msg+=("An email address is required\n\n");
		
	}	
	
	
	if (msg.length==0){
		return true;
	}
	else {
		alert(msg);
		
	}
	return false;	
}

function guestBookChecker(theForm){
	var msg=new String();
	
	if (!gotData(theForm.name.value)){
		msg+=("A name is required\n\n");
		
	}
	if (!gotData(theForm.signer_email.value)){
		msg+=("An email address is required\n\n");
		
	}
	if (!gotData(theForm.city.value)){
		msg+=("A city is required\n\n");
		
	}
	if (!gotData(theForm.country.value)){
		msg+=("A country is required\n\n");
		
	}
	if (!gotData(theForm.howfound.value)){
		msg+=("How you found us is required\n\n");
		
	}
	if (!gotData(theForm.message.value)){
		msg+=("Your message is required\n\n");
		
	}
	
	
	if (msg.length==0){
		return true;
	}
	else {
		alert(msg);
		
	}
	return false;	
}

function bookChecker(theForm){
	var msg=new String();
	
	if (!gotData(theForm.courseID.value)){
		msg+=("A course needs to be selected\n\n");
		
	}
	
	if (!gotData(theForm.howManyPlayers.value)){
		msg+=("number of players is required\n\n");
		
	}	
	
	
	if (msg.length==0){
		return true;
	}
	else {
		alert(msg);
		
	}
	return false;	
}

function quickQuoteChecker(theForm){
	var msg=new String();
	if (!gotData(theForm.course.value)){
		msg+=("A course needs to be selected\n\n");
		
	}
	
	if (!gotData(theForm.date.value)){
		msg+=("You must select a date to play\n\n");
		
	}	
	
	if (!gotData(theForm.numPlayers.value)){
		msg+=("The number of players is required\n\n");
		
	}		
	
	if (!gotData(theForm.name.value)){
		msg+=("A contact name is required\n\n");
		
	}	
	
	if (!gotData(theForm.telephone.value)){
		msg+=("A contact telephone number is required\n\n");
		
	}	
	
	if (!gotData(theForm.email.value)){
		msg+=("A contact email address is required\n\n");
		
	}
	
	
	if (msg.length==0){
		return true;
	}
	else {
		alert(msg);
		
	}
	return false;	
}

function quoteChecker(theForm){
	var msg=new String();	
	
	if (!gotData(theForm.name.value)){
		msg+=("A contact name is required\n\n");
		
	}
	
	if (!gotData(theForm.email.value)){
		msg+=("An email address is required\n\n");
		
	}
	
	if (!gotData(theForm.arrivalDate.value)){
		msg+=("Your arrival date is required\n\n");
		
	}
	
	if (!gotData(theForm.departureDate.value)){
		msg+=("Your departure date is required\n\n");
		
	}
	
	if (!gotData(theForm.daysGolf.value)){
		msg+=("We need to know how many days golf you require\n\n");
		
	}
	
	if (!gotData(theForm.carHireRequired.value)){
		msg+=("We need to know if you require car hire\n\n");
		
	}
	
	
	
	
	
	
	
	
	if (msg.length==0){
		return true;
	}
	else {
		alert(msg);
		
	}
	return false;
}

function newsletterChecker(theForm){
	var msg=new String();	
	
	if (!gotData(theForm.email.value)){
		msg+=("A contact email address is required\n\n");
		
	}
	
	
	if (msg.length==0){
		return true;
	}
	else {
		alert(msg);
		
	}
	return false;	
}

function gotData(theField){
	//alert("theField is "+theField);
	if (theField.length>0){
		return true;
	}
}
