/**
* Method called to update calendar
*/
function update_calendar(year, month){
   var xhr = getXhr();
   //Define behaviour
   xhr.onreadystatechange = function(){
      // On ne fait quelque chose que si on a tout reçu et que le serveur est ok
      if(xhr.readyState == 4 && xhr.status == 200){
         di = document.getElementById('calendar');
         di.innerHTML = xhr.responseText;
      }
   }
   
   //Define POST method and header
   xhr.open("POST","php/inc.calendar.php",true);
   xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');

   //POST parameters
   //alert("year="+year+"&month="+month);
   xhr.send("year="+year+"&month="+month);		
   
}
      
