function askNewQuestionSubmit(questionId)
{
  var name = $('faq_newquestion_name').value;
  var email = $('faq_newquestion_email').value;
  var question = $('faq_newquestion_question').value;
  
  // Don't do any testing on empty fields right now. This might seem stupid
  // but there is really no way to use multilanguage in here :) Let PHP do it!
  
  
  // hide button, show wait indicator
  $('faq_newquestion_submitbutton_div').style.display = 'none';
  $('faq_newquestion_error_div').style.display = 'none';
  $('faq_newquestion_wait_div').style.display = 'block';
  $('faq_newquestion_success_div').style.display = 'none';
  
  // do ajax request
  new Ajax.Request('/faq_handlenewquestionform.php',
  {
    method:'post',
    parameters: {name: name, email: email, question: question, viewingQuestionId: questionId, questionLocation: document.location},
    onSuccess: function(transport)
    {
      $('faq_newquestion_wait_div').style.display = 'none';
      if (transport.responseText == 1)
      {
        // successfull
        $('faq_newquestion_success_div').style.display = 'block';
        $('faq_newquestion_submitbutton_div').style.display = 'block';
        $('faq_newquestion_question').value = '';
      }
      else
      {
        // got errors, display error
        $('faq_newquestion_error_div').innerHTML = transport.responseText;
        $('faq_newquestion_error_div').style.display = 'block';
        $('faq_newquestion_submitbutton_div').style.display = 'block';
      }
    },
    onFailure: function()
    {
      alert("Something went wrong while trying to send the form...");
    }
  });
}
