function validateForm() {
	var error_msg = "";
		
		if (document.contactForm.name.value.length==0) {
			error_msg =error_msg+"Name is a required field.\n";
		}
		if (document.contactForm.email.value.length==0) {
			error_msg = error_msg+"Email is a required field.\n";
		}
		if (document.contactForm.message.value.length==0) {
			error_msg = error_msg+"Message is a required field.\n";
		}
		if (document.contactForm.security_code.value.length==0) {
			error_msg = error_msg+"Security Code is a required field.\n";
		}

		var email = document.contactForm.email.value;
		var _isValidEmail = email.match(/^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/);
		if (email && !_isValidEmail) {
			error_msg = error_msg+"Email is invalid.\n";
		}
		
	if (error_msg != "") {
		alert(error_msg);
	}
	else {
		document.contactForm.submit();
	}
}
