// JavaScript Document

//functions for the hail observation form

function clearField(def_val, caller_id) {
	
	var caller = new Object();
	caller = eval("document.forms[0]."+caller_id);
	
	if (caller.value == def_val) {
		caller.value = "";
	}
	
	return;

}


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}


function checkForm() {

	with (document.forms[0]) {

		if (first.value == "" || first.value == null || first.value == "First" || last.value == "" || last.value == null || last.value == "Last") {
		
			alert("Please enter your first and last names.");
			first.focus();
			return;
			
		}
		
		if (email.value == "" || email.value == null ) {
		
			alert("Please enter your email address.");
			email.focus();
			return;
			
		}
		
		if (period.value == "" || period.value == null ) {
		
			alert("Please enter the date and time of the event being reported.");
			period.focus();
			return;
			
		}
		
		submit();
	
	}

}