function getCalendar(month,year) {

   advAJAX.post({

      url : "include/ajax_getCalendar.php",
      parameters : {
        "month": month,
        "year" : year
      },

      onInitialization : function(obj) {
         //$("cLoadingIndicator").style.visibility = "visible";
      },

      onSuccess : function(obj) {
         $("ContenitoreCalendario").innerHTML = obj.responseText;
         //$("cLoadingIndicator").style.visibility = "hidden";
      },

      onError : function(obj) {
         //$("cLoadingIndicator").style.visibility = "hidden";
         if( obj.status == 404 ) {
            alert("Il calendario non è al momento disponibile");
         }else {
            //alert("Ci sono dei problemi - " + obj.readyState + " - " + obj.status);
            $("ContenitoreCalendario").innerHTML = obj.responseText;
         }
      }

   });

}


function viewCalendarDay(day,month,year) {

   //alert('gg:' + day + ' - mm:' + month + ' - yy:' + year);

   advAJAX.post({

      url : "include/ajax_getGiornoAgenda.php",
      parameters : {
        "day"  : day,
        "month": month,
        "year" : year
      },

      onInitialization : function(obj) {
         //$("cLoadingIndicator").style.visibility = "visible";
      },

      onSuccess : function(obj) {
         $("agenda-top").innerHTML = obj.responseText;
         //$("cLoadingIndicator").style.visibility = "hidden";
      },

      onError : function(obj) {
         //$("cLoadingIndicator").style.visibility = "hidden";
         if( obj.status == 404 ) {
            alert("Il calendario non è al momento disponibile");
         }else {
            //alert("Ci sono dei problemi - " + obj.readyState + " - " + obj.status);
            $("agenda-top").innerHTML = obj.responseText;
         }
      }

   });

}

