function validate_contact_form() {

  // Create the initial error message variable
  var message = '';

  // Cycle through each of the inputs in the contact_form element
  jQuery('.contact_form input').each(function() {
    if(jQuery(this).val().length == 0) {
      // Get the name of the element
      var field_name = jQuery(this).attr('name').replace('_', ' ');
      message += '<p>You can not leave ' + field_name + ' blank.</p>';
    }
  });

  if(jQuery('.contact_form textarea').val().length == 0) {
    // Get the name of the element
    var field_name = jQuery('.contact_form textarea').attr('name').replace('_', ' ');
    message += '<p>You can not leave ' + field_name + ' blank.</p>';
  }

  if(message.length > 0) {
    // Put the contents of the error message in the error element and style it out a bit
    jQuery('.message').html(message);
    jQuery('.message').css({'border' : '3px double #c00', 'padding' : '1em'});
    jQuery('.message p ').css({'color' : '#c00', 'margin-bottom' : '0'});
    return false;
  } else {
    return true;
  }
}