var fechaInicio = new Date(2900,1,1);
var fechaFin = new Date(1900,1,1);

Calendar.setup({
inputField		:		"inicio",     // id of the input field
ifFormat			:		"%Y/%d/%m",     // format of the input field (even if hidden, this format will be honored)
button			:		"inicioCal",       // ID of the span where the date is to be shown
daFormat			:		"%A, %B %d, %Y",// format of the displayed date
align				:		"Tl",           // alignment (defaults to "Bl")
dateStatusFunc	:		function (date) { // disable weekend days (Saturdays == 6 and Subdays == 0)
								var cDate = "";
								
								// Si hay fechas reservadas
								cDate = cDate + date.getFullYear() + "/";
								if (date.getDate() < 10) {
									cDate = cDate + "0" + date.getDate() + "/";
								}
								else {
									cDate = cDate + date.getDate() + "/";
								}
								
								if ((date.getMonth()+1) < 10) {
									cDate = cDate + "0" + (date.getMonth()+1);
								}
								else {
									cDate = cDate + (date.getMonth()+1);
								}
								var total = (fechasInvalidas.length);
								
								for (i=0; i<total; ++i) {
									if (fechasInvalidas[i] == cDate) {
										return true;
									}
								}
								
								return false;
							},
onSelect			:		function (calendar, date) {
								input = document.getElementById('inicio');
								var splitDate = date.split('/');
								
								fechaInicio.setFullYear(splitDate[0]);
								fechaInicio.setMonth(splitDate[2]);
								fechaInicio.setDate(splitDate[1]);
								
								input.value = date;
							}
 });
