function checkForm() {
	// clear validation messages
	$('#validation_message').html('<p>In order to complete your application, the following problems must be corrected:</p>');
	
	// validation
	var errors = new Array();
	
	if ( ! $("#name").val() ) { errors.push('Please enter your name'); }
	if ( ! $("#email").val() ) { errors.push('Please enter your email address'); }
	if ( ! $("#phone").val() ) { errors.push('Please enter your phone number'); }
	if ( ! $("#street1").val() ) { errors.push('Please enter your street address'); }
	if ( ! $("#city").val() ) { errors.push('Please enter your city'); }
	if ( ! $("#state").val() ) { errors.push('Please enter your state'); }
	if ( ! $("#zip").val() ) { errors.push('Please enter your zip code'); }
	if ( ! $("#availability").val() ) { errors.push('Please enter your availability'); }
	if ( $("input[@id=certified]:checked").length == 0 ) { errors.push('Please check the certification checkbox'); }

	if ( errors.length > 0 ) {
		// write out errors
		var errorList = '<p><ul>';
		for (var error in errors) {
			errorList += '<li>'+errors[error]+'</li>';
		}
		errorList += '</ul></p>';
		$('#validation_message').append(errorList);

		// and show them
		$('#validation_message').show(0);
		$('html,body').animate({scrollTop: 0}, 1000);
		return false;
	} else {
		// submit form
		document.form.submit();
		return true;
	}
}

$(document).ready( function() {
	// hide check info
	$('.check').hide(0);

	// hide validation message
	$('#validation_message').hide(0);
	
	$('#submitButton').click( function() {
		//e.preventDefault();
		//checkForm();
	});
});

