function init() {
	YAHOO.hudson.bus_flow.setupCalendars();
	YAHOO.hudson.bus_flow.setParentHeightTo(1000);
};


/* --- Calendar-related funcitons */	
YAHOO.hudson.bus_flow.CalendarDaySelected = function(type, args, obj) {
	var dates = args[0]; 
	var date = dates[0]; 
	var year = date[0], month = date[1], day = date[2];  

	$('time').value = month + "/" + day + "/" + year; 
	YAHOO.hudson.bus_flow.cal.hide();
}
YAHOO.hudson.bus_flow.setupCalendars = function() {
	var today = new Date();
	var max_date = new Date(today.getFullYear(), today.getMonth(), today.getDate());
	max_date.setDate(max_date.getDate() + 14);
	var calendar_options = {
		pages: 1,
		mindate: today,
		maxdate: max_date
	};

	YAHOO.hudson.bus_flow.cal = new YAHOO.widget.CalendarGroup("calendar_container", calendar_options);
	YAHOO.hudson.bus_flow.cal.render();

	YAHOO.util.Event.addListener("time", "click", function() {
		YAHOO.hudson.bus_flow.cal.show();
		$('time').blur();
	}, YAHOO.hudson.bus_flow.cal, true);

	YAHOO.hudson.bus_flow.cal.selectEvent.subscribe(YAHOO.hudson.bus_flow.CalendarDaySelected, 
		YAHOO.hudson.bus_flow.cal, true);			
}