$(function(){
					$("#btnSubmit").click(function(e){
						var isValid = true;
						var errMessage = "Please correct the following errors: \r\n\r\n";
							$(".required").each(function(){
								//window.alert($(this).attr("id"));
								if($(this).val() == ""){
									//window.alert("Value of " + $(this).attr("name") + " = " + $(this).val());
									//window.alert("Please enter a value for " + $(this).attr("name"));
									$(this).addClass("fieldErr");
									isValid = false;
								}
								else {
									$(this).removeClass("fieldErr");
								}
							});
							if (isValid == false){
								errMessage += "Please enter the following fields in RED \r\n";
							}
							if($(".emailAddress").val().indexOf("@") == -1) {
								errMessage += "Please enter a valid email address \r\n";
								isValid = false;
							}
							if (isValid == false) {
								window.alert(errMessage);
								e.preventDefault();
							}
					});
				});
