function in_calendar() {
	Zapatec.Calendar.setup({
		weekNumbers       : false,
		range             : [2009.09, 2010.06],
		electric          : false,
		inputField        : "checkInDate",
		button            : "checkInDate_button",
		ifFormat          : "%d-%b-%Y",
		daFormat          : "%Y/%m/%d",
		numberMonths      : 2,
		monthsInRow       : 2,
		dateStatusFunc    : function(date, y, m, d) {
			var today = new Date();
			if (dateIsSpecial(y, m, d)) {
				return "zpCalSpecialDay";
			// true = disabled, false = enabled
			} else if (dateIsDisabled(y, m, d)) {
				return true;
			} else {
				if (date.getDay()==1 || date.getDay()==3 || date.getDay()==5 || date.getDay()==6) return true; // no tue and sat flight
  				if (date.getTime() < (today.getTime()+(1000*60*60*24*3))) return true; // 3 days advance booking!!!
				return false;
			}
		}
	});
	
	//months are 0 based which is a little confusing
	var SPECIAL_DAYS = [];
	
	var DISABLED_DAYS = [];
	
	function dateIsSpecial(year, month, day) {
		for (ii = 0; ii < SPECIAL_DAYS.length; ii++) {
			if (((SPECIAL_DAYS[ii] [0]) == month) &&
			(((SPECIAL_DAYS[ii] [1]) == day))) {
				return true;
			}
		}
		return false;
	};
	
	function dateIsDisabled(year, month, day) {
		for (jj = 0; jj < DISABLED_DAYS.length; jj++) {
			if (((DISABLED_DAYS[jj] [0]) == month) &&
			(((DISABLED_DAYS[jj] [1]) == day))) {
				return true;
			}
		}
		return false;
	};
}

function return_calendar() { // Specify a different return date that does not fit the no. of nights. By Carrel
	Zapatec.Calendar.setup({
		weekNumbers       : false,
		range             : [2009.09, 2010.06],
		electric          : false,
		inputField        : "checkOutDate",
		button            : "checkOutDate_button",
		ifFormat          : "%d-%b-%Y",
		daFormat          : "%Y/%m/%d",
		numberMonths      : 2,
		monthsInRow       : 2,
		dateStatusFunc    : function(date, y, m, d) {
			var today = new Date();
			if (dateIsSpecial(y, m, d)) {
				return "zpCalSpecialDay";
			// true = disabled, false = enabled
			} else if (dateIsDisabled(y, m, d)) {
				return true;
			} else {
				if (date.getDay()==0 || date.getDay()==2 || date.getDay()==4 || date.getDay()==5) return true; // no tue, sat flights
  				if (date.getTime() < (today.getTime()+(1000*60*60*24*5))) return true; // 3 days advance booking + 2 nights!!!
				return false;
			}
		}
	});
	
	//months are 0 based which is a little confusing
	var SPECIAL_DAYS = [];
	
	var DISABLED_DAYS = [];
	
	function dateIsSpecial(year, month, day) {
		for (ii = 0; ii < SPECIAL_DAYS.length; ii++) {
			if (((SPECIAL_DAYS[ii] [0]) == month) &&
			(((SPECIAL_DAYS[ii] [1]) == day))) {
				return true;
			}
		}
		return false;
	};
	
	function dateIsDisabled(year, month, day) {
		for (jj = 0; jj < DISABLED_DAYS.length; jj++) {
			if (((DISABLED_DAYS[jj] [0]) == month) &&
			(((DISABLED_DAYS[jj] [1]) == day))) {
				return true;
			}
		}
		return false;
	};
}

/*var room_type = new Array();
room_type[0] = new Array("Royale Suite", "Bella Suite");
room_type[1] = new Array("Grand Room");
room_type[2] = new Array("Standard Room");
room_type[3] = new Array("Deluxe Room");
room_type[4] = new Array("Deluxe Room");
room_type[5] = new Array("Superior Room");
room_type[6] = new Array("Standard Room");
room_type[7] = new Array("Standard Room");
room_type[8] = new Array("Standard Room");

function updateRoomType(ID) {
	document.frmBooking.selRoomType.length = room_type[ID].length;
	var i=0;
	for (i=0; i<room_type[ID].length; i++) document.frmBooking.selRoomType.options[i] = new Option(room_type[ID][i], room_type[ID][i]);
}*/

function updateRoomType(ID) {
	if (ID==0) {
		document.frmBooking.selRoomType.length = 4;
		document.frmBooking.selRoomType.options[0] = new Option("Royale Suite Double", "Royale Suite Double");
		document.frmBooking.selRoomType.options[1] = new Option("Royale Suite Single", "Royale Suite Single");
		document.frmBooking.selRoomType.options[2] = new Option("Bella Suite Double", "Bella Suite Double");
		document.frmBooking.selRoomType.options[3] = new Option("Bella Suite Single", "Bella Suite Single");
	} else if (ID==1 || ID==2 || ID== 3 || ID==4 || ID==6 || ID==7) {
		document.frmBooking.selRoomType.length = 2;
		document.frmBooking.selRoomType.options[0] = new Option("Double/ Twin", "Double/ Twin");
		document.frmBooking.selRoomType.options[1] = new Option("Single", "Single");
	} else if (ID==5 || ID==7) {
		document.frmBooking.selRoomType.length = 4;
		document.frmBooking.selRoomType.options[0] = new Option("Deluxe Double", "Deluxe Double");
		document.frmBooking.selRoomType.options[1] = new Option("Deluxe Single", "Deluxe Single");
		document.frmBooking.selRoomType.options[2] = new Option("Grand Suite Double", "Grand Suite Double");
		document.frmBooking.selRoomType.options[3] = new Option("Grand Suite Single", "Grand Suite Single");
	}
}