function fncValidateForm(objForm) {
	var strEmptyMsg = "";
	var strErrorMsg = "";
	var intErrors = 0;
	
	//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 strFName = new String(objForm.firstname.value);
	var strLName = new String(objForm.lastname.value);
	var strPhone = new String(objForm.phone.value);
	
	// check all compulsory fields to see if empty
	if (strFName.length == 0) {
		strEmptyMsg += " --> First name\n";
		intErrors++;
	}
	if (strLName.length == 0) {
		strEmptyMsg += " --> Last name\n";
		intErrors++;
	}
	if (strPhone.length == 0) {
		strEmptyMsg += " --> Phone\n";
		intErrors++;
	}
	// check all fields to see if they contain disallowed characters
	if (strFName.indexOf("@") >= 0 || strFName.indexOf(":") >= 0 || strFName.indexOf(";") >= 0 || strFName.split("http").length-1 > 1 )  {
		strErrorMsg += " --> First name\n";
		intErrors++;
	}
	if (strLName.indexOf("@") >= 0 || strLName.indexOf(":") >= 0 || strLName.indexOf(";") >= 0 || strLName.split("http").length-1 > 1 )  {
		strErrorMsg += " --> Last name\n";
		intErrors++;
	}
	if (strPhone.indexOf("@") >= 0 || strPhone.indexOf(":") >= 0 || strPhone.indexOf(";") >= 0 || strPhone.split("http").length-1 > 1) {
		strErrorMsg += " --> Phone\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;
	}

}
