function afficherQuestion(idArticle)
{

   if (ancienLien=="div_question_")
      ancienLien="";

   $('attente_question').innerHTML="<img src='/IMG/attente.gif'/>";
   var lien="div_question_"+idArticle;

   new Ajax.Request("/scripts/afficher-article.php",
   {

      method: "post",
      parameters: $H({"idArticle": idArticle}).toQueryString() ,

      onSuccess: function(req)
      {

         try
         {
            if (ancienLien!="")
               $(ancienLien).style.backgroundColor="rgb(255, 255, 255)";
         }

         catch (e)
         {
         }

         $('question_reponse').innerHTML=req.responseText;
         $('attente_question').innerHTML="";

         $(lien).style.backgroundColor="rgb(229, 245, 172)";
         ancienLien=lien;

      },

      onFailure: function(req)
      {
         $('attente_question').innerHTML="";
         alert("Une erreur est survenue");
      },

      onException: function(req,ex)
      {
         $('attente_question').innerHTML="";
         alert("Une erreur est survenue");
      }

   });

}

function imprimerQuestion(idArticle)
{

   $('attente_question').innerHTML="<img src='/IMG/attente.gif'/>";

   new Ajax.Request("/spip.php",
   {

      method: "get",
      parameters: $H({"id_article": idArticle, "page": "article_pdf"}).toQueryString() ,

      onSuccess: function(req)
      {
         window.location="/spip.php?page=article_pdf&id_article="+idArticle;
      },

      onFailure: function(req)
      {
         $('attente_question').innerHTML="";
         alert("Une erreur est survenue");
      },

      onException: function(req,ex)
      {
         $('attente_question').innerHTML="";
         alert("Une erreur est survenue");
      }

   });

}
