function validateForm(formObj) {
	var submitTheForm = true;
	var actionType = '';
	/* actionType CALL_BACK is a specific version of the more generic actionType SEND_EMAIL */

	/* typically the messages that check if a field is undefined are aimed at the block-designer (ie the user in the marketing dept) 
		and the messages that check if there is any content in the field are aimed at the end-user of the site */
	
	if (formObj.action_type==undefined) {
		alert('You must define an action_type field');	
		submitTheForm = false;	
	} else {
		actionType = formObj.action_type.value;
	};
	
	if (actionType=='SEND_EMAIL' || actionType=='CALL_BACK') {
		if (formObj.email_to==undefined || formObj.email_to.value=='') {
			alert('You must define an email_to field');	
			submitTheForm = false;	
		};	
		if (actionType=='CALL_BACK') {
			if (formObj.contact_name==undefined || formObj.contact_tel==undefined) {
				alert('You must define a contact_name and a contact_tel field');	
				submitTheForm = false;	
			}
		};
	};

	if (submitTheForm) {
		if (actionType=='CALL_BACK') {
			if (trim(formObj.contact_name.value) == '' || trim(formObj.contact_tel.value) == '') {
				alert('To request a call back you must enter a contact name and a telephone number');	
				submitTheForm = false;	
			};
		};
	};

	return submitTheForm;
}
	