function fncValidateFeedbackForm(objForm) { // Validate quote form	
	var strEmptyMsg = "";
	var strErrorMsg = "";
	var intErrors = 0;
	
	function validateFields(str, error) {
		// check all fields to see if they contain disallowed characters
		if (str.indexOf("@") >= 0 || str.indexOf(":") >= 0 || str.indexOf(";") >= 0 || str.split("http").length-1 > 1 )  {
			strErrorMsg += " --> "+error+"\n";
			intErrors++;
		}
	}
	
	function checkIfEmpty(str, error) {
		if (str.length == 0) {
			strEmptyMsg += " --> "+error+"\n";
			intErrors++;
		}
	}
	
	// get variables from the form	
	var rateExperience = new String(objForm.rateExperience.value);
	var comments = new String(objForm.comments.value);
	var name = new String(objForm.name.value);
	var phoneNumber = new String(objForm.phoneNumber.value);
	var address = new String(objForm.address.value);
	var dof = new String(objForm.dof.value);
	
	// check all compulsory fields to see if empty
	checkIfEmpty(rateExperience, 'How would you rate your experience');
	checkIfEmpty(comments, 'Addtional comments');
	checkIfEmpty(name, 'Name');
	checkIfEmpty(phoneNumber, 'Phone number');
	checkIfEmpty(address, 'Delivery address');
	checkIfEmpty(dof, 'Date of function');
	
	// function that checks all fields for disallowed characters
	validateFields(rateExperience, 'How would you rate your experience');
	validateFields(comments, 'Addtional comments');
	validateFields(name, 'Name');
	validateFields(phoneNumber, 'Phone number');
	validateFields(address, 'Delivery address');
	validateFields(dof, 'Date of function');
	

	// checking any checboxes which need to be checked
	/*if (objForm.consent.checked != true) {
	strEmptyMsg += " --> Please tick the consent checkbox\n";
	intErrors++
	}*/
	
	// if there are any errors show these
	if(intErrors > 0) {
		var message = '';
		if(strEmptyMsg != '') message = message + "Please fill in the following fields:\n" + strEmptyMsg + "\n";
		if(strErrorMsg != '') message = message + "Please remove the characters : ; or @ and any instances of 'http' in the following fields:\n" + strErrorMsg + "\n";
		
		alert(message);
		return false;
	} else {
		// return true if all ok and send email
		return true;
	}
}
