// JavaScript Document

	function clear_contactform() {
		document.contactForm.reset();
		scroll(0,0);
	}
	
	function clear_getInvolvedForm() {
		document.getInvolvedForm.reset();
		scroll(0,0);
	}

$(document).ready(function() {


	//alerttxt_email = "Please provide a valid E-mail address.";
	alerttxt_null = "Please enter a value for all required fields.";
	
	
	
	$("#contactForm").submit(function () {
		/* EMAIL */
		c_email = $("#c_email").val();
		c_name = $("#c_name").val();
		c_subject = $("#c_subject").val();
		c_comment = $("#c_comment").val();
		
		if (c_email == '' || c_name == '' || c_subject == '' || c_comment == ''){
			alert(alerttxt_null);
			return false;
		} else {
			alert("Thank you for contacting the Team Jesse Foundation.");
			setTimeout('clear_contactform()', 400);
			return true;
		}
	});
		
	$("#getInvolvedForm").submit(function () {
		/* EMAIL */							   
		g_fname = $("#g_fname").val();
		g_lname = $("#g_lname").val();
		/*
		g_address1 = $("#g_address1").val();
		g_address2 = $("#g_address2").val();
		*/
		g_city = $("#g_city").val();
		g_state = $("#g_state").val();
		g_zip = $("#g_zip").val();
		g_email = $("#g_email").val();
		
		
		if (g_fname == '' || g_lname == '' || g_city == '' || g_state == '' || g_zip == '' || g_email == ''){
			alert(alerttxt_null);
			return false;
		} else {
			alert("Thank you for joining us in our mission to help families of fallen soldiers.");
			setTimeout('clear_getInvolvedForm()', 400);
			return true;
			
		}
	});


});
						   
