



function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 





function display_div(show){
   document.getElementById(show).style.display = "";
 }
 
 function hide_div(hide){
   document.getElementById(hide).style.display = "none";
 }
 
 function showMe(id) { // This gets executed when the user clicks on the checkbox
    var obj = document.getElementById(id);
if (obj.style.display=="none") { // if it is checked, make it visible, if not, hide it
    obj.style.display = "";
} else {
    obj.style.display = "none";
}
}

$(document).ready(
	      
	function() { 

		$("#form1").validate({
		  onfocusout: false,
			onkeyup: false,
			focusInvalid:false,

			rules: {
				Contact0FirstName: {
					required: true,
					notequal: 'Enter First Name'
				},
				Contact0Email: {
					required: true,
					email: true
				}
			},
			
			messages: {
				Contact0FirstName: "Name is required.",
				Contact0Email: {
					required: "Email address is required.",
					email: "A valid email address is required."
				}
			},
			
			showErrors: function(errorMap, errorList) {
				msg = '';
				len = errorList.length;
				for (x=0; x < len; x++) {
					msg += errorList[x].message + '\n\n';
				}
				if (msg != '') {alert(msg);} 
			},
			
			submitHandler: function(form) {
				PreventExitSplash=true;
				form.submit();
			}
		});
	}
);

