// USER: MODIFY THESE VALUES TO FIT YOUR NEEDS

// The last year to display in the select box
var maxYear = 2005;	// Must be a valid year; applies to both check-in and check-out dates

// This represents the number of days to add to todays date to be shown in the search section.
// If set to 0 (zero), today's date will be displayed. Calculations had to be done to cover all possible
// cases. For example, if today is Dec 31, and you are adding one day, we have to adjust the date to Jan 1 next year.
// The number you set must be an integer; the date will automatically adjust, whatever the number is;
// if you set to to 1000, for example, it will shift the date for 1000 days
var nPlusDays = 4;


//*******************************************************
// DO NOT MODIFY BELOW

function updateDateInSearchBox()
{
	var today = new Date();
	today.setDate(today.getDate() + nPlusDays);
	document.search.selMonth.value = today.getMonth() + 1;
	document.search.selDay.value = today.getDate();
	//document.search.selYear.value = today.getYear();			// uncomment this like if you do not like the change of the year-section of the searchbox, but also...
	
	// draw select box
	var strSelYear = '';
	strSelYear += '<select name="selYear">'
	for(var n = today.getYear(); n < maxYear + 1; n++)
		strSelYear += '<option value="' + n + '">' + n + '</option>';
	strSelYear += '</select>';
	selyr.innerHTML = strSelYear;								// ... comment this line out, as well. And also, copy the HTML code of the select box back to where it was.
}		
