rem: var selectedDay = viewDeck.selectedPanel.selectedDay; 
add: selectedDay = viewDeck.selectedPanel.selectedDay; currentSelection = viewDeck.selectedPanel.getSelectedItems({}); 
context: function switchToView(aViewType) {    var viewDeck = getViewDeck();    var selectedDay;    try {        var selectedDay = viewDeck.selectedPanel.selectedDay;    } catch(ex) {        // This dies if no view has even been chosen this session, but that's        // ok because we'll just use now() below.    }     if (!selectedDay)        selectedDay = now();    // Anyone wanting to plug in a view needs to follow this naming scheme    var view = document.getElementById(aViewType+"-view");    viewDeck.selectedPanel = view;    var compositeCal = getCompositeCalendar();    if (view.displayCalendar != compositeCal) {        view.displayCalendar = compositeCal;        view.timezone = calendarDefaultTimezone();        view.controller = calendarViewController;    }    view.goToDay(selectedDay);}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/daf762c7fca63c377d255ff7e70b1b7a4b4cb141/calendar-views.js/clean/calendar/base/content/calendar-views.js