function checkRegistrationForm(hash, check_type) {
  var url = 'include/ajaxscripts/register-check.php';
  var form_id = 'form-'+hash;
  var data = $(form_id).serialize(true);
  data['check_type'] = check_type;
  var waiting_img = "<img src='img/indicator.gif' />";
  
  $(check_type+'_feedback-'+hash).innerHTML = "<div class='notice warning'>"+waiting_img+" Processing Form...</div>";
  $(form_id).disable();
  
  var callback = function(t){ 
    $(form_id).enable();// you have to enable the form before you submit it
    if(!t.responseText) {
      $(check_type+'_feedback-'+hash).innerHTML = "<div class='notice success'>"+waiting_img+" Submitting Registration...</div>";
      $(form_id).submit();
      $(form_id).disable();
    } else {
      $(check_type+'_feedback-'+hash).innerHTML = t.responseText;
    }
  };
  
  var onfail = function(t) {
    $(check_type+'_feedback-'+hash).innerHTML = "<div class='notice error'>There was an error communicating with the Firefly Server. Try refreshing the page.</div>";
  }
  new Ajax.Request(url, {parameters: data, onSuccess: callback, onFailure: onfail} );
}