function validate()
{
	formObj = document.msgform;
	var errorName = ""
	var error = "";
	var emailstrng = formObj.email.value;
	var emailFilter = /^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/

	if (formObj.name.value == "") {
		errorName += "- You have not filled in your name.\n"
	}

	if (emailstrng == "") {
		errorName += "- You have not filled in an e-mail address.\n";
	}
	else {
		if (!(emailFilter.test(emailstrng))) {
			errorName += "- The provided e-mail address is not valid.\n";
		}
		else {
			if (emailstrng.match(illegalChars)) {
			errorName += "- The provided e-mail address contains illegal characters.\n";
			}
		}
	}

	if (formObj.phone.value == "") {
		errorName += "- You have not provided a phone number.\n"
	}

	if (formObj.comments.value == "") {
		errorName += "- Your message to us is empty.\n";
	}

	if (errorName == "") {
		return true;
	}

	else {
		errorName = "Validation of your message indicates that:\n\n" + errorName;
		errorName += "\nClick [OK] to change your input or [Cancel] to send the message like this."

		if (confirm(errorName)) {
				return false;
		}

		else {
			return true;
		}
	}
}

function chkeml()
{
	formObj = document.msgform;
	var emailstrng = formObj.email.value;
	var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
	if (emailstrng.match(illegalChars)) {
		//formObj.email.focus();
		alert('The provided e-mail address contains illegal characters.');
		return false;
	}
	else {
		return true;
	}
}