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 strPhone = new String(objForm.phone.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 (strPhone.length == 0) {
		strEmptyMsg += " --> Phone\n";
		intErrors++;
	}
	
	// check all fields to see if they contain disallowed characters
	validate(strName, 'Name');
	validate(strPhone, 'Phone');
	validate(strComments, 'Comments');
	
	// 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;
	}

}