

var xhr = null;

function get_Xhr()

 {

  if(window.XMLHttpRequest)

   {

    xhr = new XMLHttpRequest();

   }

  else if(window.ActiveXOject)

   {

    try

     {

      xhr = new ActiveXObject("Msxml2.XMLHTTP");

     }

    catch(e)

     {

      try

       {

        xhr = new ActiveXObject("Microsoft.XMLHTTP");

       }

      catch(el)

       {

        xhr = null;

       }

     }

   }

  else

   {

    alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest\nVeuillez le mettre à jour");

   }

  return xhr;

 }

 
var i=0;
//var max = document.getElementById('max_id');
function anim(a)

 {
  get_Xhr();

  xhr.onreadystatechange = function()

   {

   if(xhr.readyState != 4){

   document.getElementById('box_c').innerHTML = "<div id='load'><img src='images/load.gif' /></div>";

   }

    if(xhr.readyState == 4 && xhr.status == 200)

     {

      

      document.getElementById('box_c').innerHTML = xhr.responseText;

     }

   }
 


  xhr.open("POST",'anim.php?a='+a,true);

  xhr.setRequestHeader('Content-Type','x-www-form-urlencoded');



  xhr.send(null);

 }
 



 


