var ezPath = "/ezcalendar/";

function changeMonth(month,year) {
  buildCalendarCover();
	if(Ajax.getTransport() !== false){
  	new Ajax.Request(ezPath+'calendar', {
  		method: 'post', 
  		parameters:{
  		year: year,
  		month: month},
  		onComplete: function(transport){
  		  if (200 == transport.status){
          var response = transport.responseText;
          $('calendar').update(response);
          removeCalendarCover();
        }else{
          alert('Error: ' + transport.status + ' -- ' + transport.statusText);
        }
  		},
  		onFailure: function(transport){
        alert('Ajax Failure: ' + transport.status + ' -- ' + transport.statusText);
      },
      onException: function(transport,e){
        alert('Ajax Exception: ' + e.message);
      }
  	})
  }else{
    alert('Ajax Failure: the ActiveX are disabled');
  }
}