function submit_comment()
{
    $('activity_indicator').show();
    
    // REMOVE VALIDATION ERRORS
    $$('.error-message').each(function(e){
        e.remove();
    });



    $('user_feedback_form').action = '/blog_comments/add';
    $('user_feedback_form').request({
      onComplete: function(transport){ 
          $('activity_indicator').hide();        


            var response = eval('('+transport.responseText+')');
            
            // ERRORS?
            if (response.errors!=undefined) {
                var formErrors = response.errors;

                ['email','commenter','comment'].each(function(s){

                  if (eval('formErrors.'+s)) {

                      var emailValidationError = new Element('div');
                      emailValidationError.update(eval('formErrors.'+s));
                      emailValidationError.addClassName('error-message');

                      $('BlogComment'+capitalizeWord(s)).insert({ after : emailValidationError });
                  };
                });
            
            }
            // SUCCESSFUL SAVE?
            if (response.save_feedback!=undefined) {
                
                if (response.save_feedback.active==1) {
                   $('user_review_form').update('<h1 style="padding:20px 0">Your comment was successfully posted!</h1>');
                };
                if (response.save_feedback.active==0) {
                    $('user_review_form').update('<h1 style="padding:20px 0">Your comment has been received and will go live as soon as it is moderated by our editors.</h1>');
                };   
                                      
            }
            
        }
        
    });

    
}
function capitalizeWord(word) {

    return word.substring(0,1).toUpperCase() + word.substring(1,word.length);

}
