function submitComment() {
	show('comment-waiting'); hide('comment-form'); hide('comment-error');
	var status = AjaxRequest.submit(
    document.getElementById('commentform')
    ,{
      'timeout':25000,
      'onTimeout':function(req){ hide('comment-waiting'); show('comment-form'); alert('Timeout error. Essayez un autre fois.'); },
      'onSuccess':function(req){ hide('comment-waiting'); if (req.responseText != 'done') setCommentError(req.responseText); else show('comment-done'); },
      'onError':function(req){ hide('comment-waiting'); show('comment-form'); alert('Erreur HTTP: '+req.statusText+'.\nEssayez une autre fois plus tard.'); }
    }
  );
}

function setCommentError(text) {
	document.getElementById('comment-captchaimg').src = '/account/captcha.php?' + Math.random();
	document.getElementById('comment-captcha').value = '';
	document.getElementById('comment-error').innerHTML = text;
	show('comment-error');
	show('comment-form');
}