rem:   if( this.currentView !== newView ) {   if( this.currentView ) { this.currentView.switchFrom(); }    this.currentView = newView;    newView.switchTo();  newView.refresh(); } 
add: var deck = document.getElementById("view-deck"); var day; try { day = deck.selectedPanel.selectedDay; } catch(ex) {}   if (!day) day = now(); deck.selectedPanel = document.getElementById(newView); deck.selectedPanel.goToDay(day); 
context: CalendarWindow.prototype.switchToView = function calWin_switchToView( newView ){   // only switch if not already there      if( this.currentView !== newView )   {      // call switch from for the view we are leaving            if( this.currentView )      {         this.currentView.switchFrom();      }            // change the current view            this.currentView = newView;            // switch to and refresh the view            newView.switchTo();            newView.refresh();   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ea0a19bbff318452a3dd971a2d778d5c35d82b4a/calendarWindow.js/buggy/calendar/resources/content/calendarWindow.js