function fncValidateForm(objForm) {
	var strEmptyMsg = "";
	var strErrorMsg = "";
	var intErrors = 0;
	
	function validate(str, text) {
		if (str.indexOf("@") >= 0 || str.indexOf(":") >= 0 || str.indexOf(";") >= 0 || str.split("http").length-1 > 1) {
			strErrorMsg += " --> "+text+"\n";
			intErrors++;
		}
	}
	
	//validates email address
	var reString = /^(\w+([-.]\w)*)+[@]\w+(([-]\w+)*[.]\w+)+$/;
	var regex = new RegExp(reString);
	var strValidSample = "aaa.bbbbbb@cccc.ddd";
	var strEmail = new String(objForm.email.value);
	
	if (strValidSample.search(regex) == -1) {
		// this is netscape 4.x or early IE 5.0x
		// we'll check for a @, the presence of spaces, a length of at least 6 (a@b.co is the smallest valid email string), the presence of a .
		if((strEmail.indexOf("@") == -1) || (strEmail.indexOf(" ") > -1) || (strEmail.length < 6) || (strEmail.length == 0)  || (strEmail.indexOf(".") == -1)) {
			strEmptyMsg += " --> Email\n";
			intErrors++;
		}
	} else {
		if (objForm.email.value.search(regex) == -1 || strEmail.length == 0) {
			strEmptyMsg += " --> Email\n";
			intErrors++;
		}
	}
	
	// get variables from the form
	var strName = new String(objForm.name.value);
	var strPhoneHome = new String(objForm.phone_home.value);
	var strPhoneBusiness = new String(objForm.phone_business.value);
	var strPhoneMobile = new String(objForm.phone_mobile.value);
	var strComingtoNZ = new String(objForm.coming_to_nz.value);
	var strPartnersOccupation = new String(objForm.partners_occupation.value);
	var strHouseinUK = new String(objForm.house_in_uk.value);
	var strComments = new String(objForm.comments.value);
	
	// check all compulsory fields to see if empty
	if (strName.length == 0) {
		strEmptyMsg += " --> Name\n";
		intErrors++;
	}
	if (strPhoneHome.length == 0) {
		strEmptyMsg += " --> Home Phone\n";
		intErrors++;
	}
	
	// check all fields to see if they contain disallowed characters
	validate(strName, 'Name');
	validate(strPhoneHome, 'Home Phone');
	validate(strPhoneBusiness, 'Business Phone');
	validate(strPhoneMobile, 'Mobile Phone');
	validate(strComingtoNZ, 'Indicate when you are interested in coming to New Zelaand');
	validate(strPartnersOccupation, 'My partners occupation is');
	validate(strHouseinUK, 'Do you have a house in the UK?');
	validate(strComments, 'Comments');

	// 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;
	}

}