
 function disablePast(date) {
	  var now = new Date();
	  if(date >= now)
		return false;
	  else
		return true;
  }

 
function disableHtlCin(date) {
	var now = new Date();
	if(date >= now)
		return false;
	else
		return true;
}




function updateHtlCIFromCal(cal) {
	var date = cal.date.getDate();
	var month = cal.date.getMonth();
	var depdfield = getElement('cidat_sel');
	depdfield.selectedIndex = date - 1;
	var depmfield = getElement('cimon_sel');
	depmfield.selectedIndex = month;
	// Return date Advance by 1 weeks
	var time = cal.date.getTime();
	time += Date.WEEK;
	var rdate = new Date(time);
	var datea = rdate.getDate();
	var montha = rdate.getMonth();
	var retdfield = getElement('codat_sel');
	retdfield.selectedIndex = datea - 1;
	var retmfield = getElement('comon_sel');
	retmfield.selectedIndex = montha;
}

function updateHtlCOFromCal(cal) {
	var rdate = cal.date.getDate();
	var month = cal.date.getMonth();
	var retdfield = getElement('codat_sel');
	retdfield.selectedIndex = rdate - 1;
	var retmfield = getElement('comon_sel');
	retmfield.selectedIndex = month;
}

Calendar.setup({
	inputField : "checkin_input", // id of the input field
	ifFormat : "%m/%d/%Y", // format of the input field (even if hidden, this format will be honored)
	button : "f_trigger_ci", // trigger button (well, IMG in our case)
	align : "Bl", // alignment (defaults to "Bl")
	singleClick : true,
	weekNumbers : false,
	onUpdate : updateHtlCIFromCal,
	range : [2005, 2010],
	disableFunc : disablePast
});

Calendar.setup({
	inputField : "checkout_input", // id of the input field
	ifFormat : "%m/%d/%Y", // format of the input field (even if hidden, this format will be honored)
	button : "f_trigger_co", // trigger button (well, IMG in our case)
	align : "Bl", // alignment (defaults to "Bl")
	singleClick : true,
	weekNumbers  :false,
	onUpdate : updateHtlCOFromCal,
	range : [2005, 2010],
	disableFunc : disableHtlCin
});



// Near an Airport Tab calender setup 

 
function air_disableHtlCin(date) {
	var pudate = new Date();
	
	if(date >= pudate)
		return false;
	else
		return true;
}

function air_updateHtlCIFromCal(cal) {
	var date = cal.date.getDate();
	var month = cal.date.getMonth();
	var depdfield = getElement('air_cidat_sel');
	depdfield.selectedIndex = date - 1;
	var depmfield = getElement('air_cimon_sel');
	depmfield.selectedIndex = month;
	// Return date Advance by 1 weeks
	var time = cal.date.getTime();
	time += Date.WEEK;
	var rdate = new Date(time);
	var datea = rdate.getDate();
	var montha = rdate.getMonth();
	var retdfield = getElement('air_codat_sel');
	retdfield.selectedIndex = datea - 1;
	var retmfield = getElement('air_comon_sel');
	retmfield.selectedIndex = montha;
}

function air_updateHtlCOFromCal(cal) {
	var rdate = cal.date.getDate();
	var month = cal.date.getMonth();
	var retdfield = getElement('air_codat_sel');
	retdfield.selectedIndex = rdate - 1;
	var retmfield = getElement('air_comon_sel');
	retmfield.selectedIndex = month;
}




Calendar.setup({
	inputField : "checkin_input", // id of the input field
	ifFormat : "%m/%d/%Y", // format of the input field (even if hidden, this format will be honored)
	button : "air_trigger_ci", // trigger button (well, IMG in our case)
	align : "Bl", // alignment (defaults to "Bl")
	singleClick : true,
	weekNumbers : false,
	onUpdate : air_updateHtlCIFromCal,
	range : [2005, 2010],
	disableFunc : disablePast
});

Calendar.setup({
	inputField : "checkout_input", // id of the input field
	ifFormat : "%m/%d/%Y", // format of the input field (even if hidden, this format will be honored)
	button : "air_trigger_co", // trigger button (well, IMG in our case)
	align : "Bl", // alignment (defaults to "Bl")
	singleClick : true,
	weekNumbers  :false,
	onUpdate : air_updateHtlCOFromCal,
	range : [2005, 2010],
	disableFunc : air_disableHtlCin
});