function PostComment() {
	
	var month = new Array(12);
      month[0]="Janvier";
      month[1]="Février";
      month[2]="Mars";
      month[3]="Avril";
      month[4]="Mai";
      month[5]="Juin";
      month[6]="Juillet";
      month[7]="Aout";
      month[8]="Septembre";
      month[9]="Octobre";
      month[10]="Novembre";
      month[11]="Decembre";
	
	var donnees = $('#frmComment').serializeArray();

  var json = "";
  jQuery.each(donnees, function(){
      jQuery.each(this, function(i, val){
              if (i=="name") {
                      json += '"' + val + '":';
              } else if (i=="value") {
                      json += '"' + val.replace(/"/g, '\\"') + '",';
              }
      });
  });
  
  json = "{" + json.substring(0, json.length - 1) + "}";
  jsonObject = eval('(' + json + ')');
	
	$.ajax({ url: "/comments/post/", context: document.body, data:  donnees, type: 'POST',

      success: function(data){

      $('#comment_form').html(data);
      
      comment_date = new Date();
      
      var new_comment = '<div class="commentaires"><img src="/site_media/images/comment-icon.png" style="width: 40px; float: left; margin-right: 10px;">' + 
                    '<div class="user-comment">' + jsonObject.name + ' à dit le ' + comment_date.getDate() + ' ' + 
                    month[comment_date.getMonth()] + ' ' + comment_date.getFullYear() + '</div><p>' + 
                    jsonObject.comment + '</p></div>';

      document.getElementById('liste_comments').innerHTML = document.getElementById('liste_comments').innerHTML + new_comment;
      
  }});
           
}
