// JavaScript Document

function highlightCalendarCell(element) {
	$(element).style.background = '#666666';
	$(element).style.color = '#CCCCCC';
}

function resetCalendarCell(element) {
	$(element).style.background = '#EDEDED';
	$(element).style.color = '#999999';
}

function startCalendar(month, year) {
	new Ajax.Updater('calendarInternal', 'calendar/eventos.php', {method: 'post', postBody: 'action=startCalendar&month='+month+'&year='+year+''});
}

function displayEvents(day, month, year) {
	new Ajax.Updater('eventList', 'calendar/eventos.php', {method: 'post', postBody: 'action=listEvents&day='+day+'&month='+month+'&year='+year+''});
	if(Element.visible('eventList')) {
		// do nothing, its already visble.
	} else {
		setTimeout("Element.show('eventList')", 300);
	}
}

startCalendar(0,0);
