function setFeatures() {
	document.search_1.features.value = document.search_1.unittype.value + document.search_1.numrooms.value;
}
	
function calculateDepartureDate() {
	
	var numberdays = document.search_1.nights.value;
	var startdate= new Date();
		
	startdate.setTime(Date.parse(document.search_1.arrivaldate.value));	
		
	if (isNaN(numberdays)) {
		alert('You must enter a number in the Nights field.');
	}
	else {
		
		var msPerDay = (24 * 60 * 60 * 1000);
		var enddate = new Date();
			
		enddate.setTime(startdate.getTime() + (msPerDay * numberdays));	
		endday		= enddate.getDate();
		endmonth	= enddate.getMonth();
		endyear		= enddate.getYear();
			
		if ((endyear < 200)   &&   (endyear > 100))	var endyear = endyear + 1900;
		if (endyear < 100)								var endyear = endyear + 2000;
		if (endmonth == 12)								var endmonth = 1;
		else 											var endmonth = (endmonth + 1);
		if (endday < 10) 								{ var endday = '0' + Number(endday); }
		if (endmonth < 10) 								{ var endmonth = '0' + Number(endmonth); }
		if (endmonth < 10) 								{ var endmonth = '0' + Number(endmonth); }
		if (document.search_1.arrivaldate.value != '')	{ document.search_1.departuredate.value = endmonth + '/' + endday + '/' + endyear; }
	}
}
	  
function calculateNights() {
	
	var enddate		= new Date();
	var msPerDay	= (24 * 60 * 60 * 1000);
	var numberdays	= document.search_1.nights.value;
	var startdate	= new Date();
		
	startdate.setTime(Date.parse(document.search_1.arrivaldate.value));	
	enddate.setTime(Date.parse(document.search_1.departuredate.value));	
		
	var nights = ((enddate - startdate) / msPerDay);
	var nights = Math.round(nights);
		
	if (nights < 1)				{ alert('Your Arrival Date must be before your Departure Date'); }
	else if (isNaN(nights))	{ document.search_1.nights.value = ''; }
	else						{ document.search_1.nights.value = nights; }
}

/***********************************************
* Bookmark site script- ¬© Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarkSite(title, url) {
	
	// Firefox
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
			
	// Opera
	else if(window.opera && window.print) {
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
		
	// IE
	else if(document.all)
		window.external.AddFavorite(url, title);
}