/*// JavaScript Document
function checkform("#contact_form")
{
  
  if (form.Email.value == "") 
  {
    alert( "Please enter your email address." );
    form.Email.focus();
    return false ;
  }
  if (form.program.value == "Directory" && form.payment.value == "Check")
  {
    alert( "We're sorry. Only paypal is an accepted payment source for the directory program." );
    form.payment.focus();
    return false;
  }else
  return true ;
}*/
$(function(){
$('#contact-submit').bind('click', function () {
    var errors = 0;
	if($("#name").val() == '')
	{
		alert("Please fill out name field.");
		errors++;
	}
	if($("#email").val() == '')
	{
		alert("Please fill out name field.");
		errors++;
	}
	if($("#message").val() == '')
	{
		alert("Please fill out name field.");
		errors++;
	}
	if(!errors)
	{
		jQuery('#contact_form').submit();
	}
   /* if (errors) 
	{
		numErrors++;
		alert(errorMessages+"Feel free to call us instead at 800.613.1207.");
                errorMessages = "";
		} 
			if(!errors)
			{*/
				jQuery('#contact_form').submit();
			/*}
			errors = false;*/
		});
});


	/*$(function(){
		// validate form
		$("#contactform").submit(function(){
			var errors = '';
			if ( $("#name").val() == '' || $("#contactname").val() == $("#contactname").attr('title') ) {
				errors += 'Enter your name.\n';
			}
			if ( !$("#contactemail").val().match(/^.+@.+/) || $("#contactemail").val() == $("#contactemail").attr('title') ) {
				errors += 'Enter your email address.\n';
			}
			if ( $("#contactphone").val() == '' || $("#contactphone").val() == $("#contactphone").attr('title') ) {
				errors += 'Enter your phone number.\n';
			}
			if ( errors == '' ) return true;
			else {
				alert(errors);
				return false;
			}
		});*/
		
