function getMMDDYY(date) {
	var month = date.getMonth()+1;
	var day = date.getDate();
	var year = date.getFullYear();

	return (month<10 ? "0" : "") + month + "/" + (day<10 ? "0" : "") + day + "/" + (year<10? "0" : "") + year;
}

var today = new Date;

yfcMiniCal.init();
//var yfc_months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//var yfc_days = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

var yfc_months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var yfc_days = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

yfcMiniCal.today = today.getDate()+1;
yfcMiniCal.formFieldSeparator = '_';
yfcMiniCal.disableSelectbox = false;
//yfcMiniCal.maxMonth = 11;
yfcMiniCal.maxMonth = 18;

var startMonth = today.getMonth();
var startYear = today.getFullYear();
for (i=0;i<=yfcMiniCal.maxMonth;i++) {
	var tempMonth = (startMonth + i) % 12;
	if (tempMonth == 0 && i!=0) startYear++;
	if (tempMonth == 1)
		yfc_days[tempMonth] = (startYear%400 == 0 || (startYear%4 == 0 && startYear%100 != 0)) ? 29 : 28;
	var lastDay = yfc_days[tempMonth];
	var monthYear = yfc_months[tempMonth] + ", " + startYear;
	var newDate = new Date(startYear,tempMonth,1);
	var tempYear = startYear;
	tempMonth = (tempMonth<9 ? "0" : "") + (tempMonth + 1);
	tempYear = (tempYear<10 ? "0" : "") + tempYear;
	
	yfcMiniCal.addMonth(tempMonth,tempYear,newDate.getDay(),lastDay,monthYear);
	if (i<yfcMiniCal.maxMonth)
		document.yfcMiniCalForm.yfcMiniCalMonths.options[i] = new Option(monthYear,i);
}
yfcMiniCal.addField('fcHotels','checkindate','checkoutdate',2);
yfcMiniCal.addField('fcHotels','checkoutdate',undefined,undefined);

var ddate= new Date();
ddate.setMilliseconds(today.getMilliseconds() + (14 * 24 * 60 * 60 * 1000));
document.fcHotels.checkindate.value = getMMDDYY(ddate);

var codate= new Date();
codate.setMilliseconds(today.getMilliseconds() + (17 * 24 * 60 * 60 * 1000));
document.fcHotels.checkoutdate.value = getMMDDYY(codate);
