Date.prototype.getWeek = function() {
var onejan = new Date(this.getFullYear(),0,1);
return Math.ceil((((this - onejan) / 86400000) + onejan.getDay())/7);
} 

document.write(getCalendarStyles());

var now 		= new Date();
now.setDate(now.getDate()-1);
var cal1xx 	= new CalendarPopup("dateDiv1");
cal1xx.addDisabledDates(null, formatDate(now,"yyyy-MM-dd"));
cal1xx.showNavigationDropdowns();

var cal2xx	= new CalendarPopup("dateDiv2");
cal2xx.addDisabledDates(null, formatDate(now,"yyyy-MM-dd"));
cal2xx.showNavigationDropdowns();	

/**
 *	Handle the action to take whenever a user has selected a 
 *	date on the calendar. By default we'll always update the
 *	three select boxes to reflect this new date, and if we
 *	called our forms with the submit imperative we will also
 *	submit the first form we find on the page. Note that this is
 *	not perfect, but it will have to suffice for now.
**/
function handleReturnDate() {
	var	newDate					=	$('arrival').value;
	var dateElements		=	newDate.split('-');
	
	$('currentDay').value 		= parseFloat(dateElements[0]);
	$('currentMonth').value		=	parseFloat(dateElements[1]);
	$('currentYear').value		=	dateElements[2];	
	$('currentDay').onchange();
	
	if (onChangeSubmit) {
		var formElements = document.getElementsByTagName('form');
		formElements[0].submit();
	}
}


function setCurrentDay (source) {
	$('currentDay').value = source.value;
}

function setCurrentMonth (source) {
	$('currentMonth').value = source.value;
}

function setCurrentYear (source) {
	$('currentYear').value = source.value;
}
