rem: this.currentView = this.dayView; document.getElementById( "day-tree-item-0" ).focus(); 
add: this.switchToMultiweekView(); 
context: function CalendarWindow( ){   //setup the preferences   this.calendarPreferences = new calendarPreferences( this );   // miniMonth used by preferences   this.miniMonth = document.getElementById( "lefthandcalendar" );      //setup the calendars   this.calendarManager = new Object();   //this.calendarManager = new calendarManager( this );      //setup the calendar event selection   this.EventSelection = new CalendarEventSelection( this );   //global date formater   this.dateFormater = new DateFormater( this );      //the different views for the calendar   this.monthView = new MonthView( this );   this.weekView = new WeekView( this );   this.dayView = new DayView( this );   this.multiweekView = new MultiweekView( this );      // we keep track of the selected date and the selected   // event, start with selecting today.      this.selectedEvent = null;   this.selectedDate = new Date();      // set up the current view - we assume that this.currentView is NEVER null   // after this      this.currentView = null;         //depending on the selected index, change views to that view.   var SelectedIndex = document.getElementById( "calendar-deck" ).selectedIndex;      switch( SelectedIndex )   {      case "1":         this.currentView = this.weekView;         document.getElementById( "week-tree-hour-0" ).focus();         break;      case "2":         this.currentView = this.dayView;         document.getElementById( "day-tree-item-0" ).focus();         break;      case "3":         this.currentView = this.multiweekView;         break;      default:         this.currentView = this.monthView;         break;   }         // now that everything is set up, we can start to observe the data source      // make the observer, the calendarEventDataSource calls into the   // observer when things change in the data source.      var calendarWindow = this;    var savedThis = this;    var calendarObserver = {        QueryInterface: function (aIID) {            if (!aIID.equals(Components.interfaces.nsISupports) &&                !aIID.equals(Components.interfaces.calICompositeObserver) &&                !aIID.equals(Components.interfaces.calIObserver))            {                throw Components.results.NS_ERROR_NO_INTERFACE;            }            return this;        },        mInBatch: false,        onStartBatch: function() {            this.mInBatch = true;        },        onEndBatch: function() {            this.mInBatch = false;            calendarWindow.currentView.refreshEvents();        },        onLoad: function() {            if (!this.mInBatch)                refreshEventTree();        },        onAddItem: function(aItem) {            if (!this.mInBatch)                calendarWindow.currentView.refreshEvents();        },        onModifyItem: function(aNewItem, aOldItem) {            if (!this.mInBatch)                calendarWindow.currentView.refreshEvents();        },        onDeleteItem: function(aDeletedItem) {            if (!this.mInBatch)                calendarWindow.currentView.refreshEvents();        },        onAlarm: function(aAlarmItem) {},        onError: function(aErrNo, aMessage) {},        onCalendarAdded: function(aDeletedItem) {            if (!this.mInBatch)                calendarWindow.currentView.refreshEvents();        },        onCalendarRemoved: function(aDeletedItem) {            if (!this.mInBatch)                calendarWindow.currentView.refreshEvents();        },        onDefaultCalendarChanged: function(aNewDefaultCalendar) {}    }    var ccalendar = getDisplayComposite();    ccalendar.addObserver(calendarObserver);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b83b9c785c3c5dd8ae7c87f79f09a1ca6af14029/calendarWindow.js/clean/calendar/resources/content/calendarWindow.js