rem: this.categoriesStringBundle = srGetStrBundle("chrome: var defaultWeeksInView = this.categoriesStringBundle.GetStringFromName("defaultWeeksInView" ); 
add: this.localeDefaultsStringBundle = srGetStrBundle("chrome: var defaultWeeksInView = this.localeDefaultsStringBundle.GetStringFromName("defaultWeeksInView" ); 
context: function MultiweekView( calendarWindow ){   // call the super constructor      this.superConstructor( calendarWindow );      this.numberOfEventsToShow = false;   var multiweekViewEventSelectionObserver =    {      onSelectionChanged : function( EventSelectionArray )      {          if( EventSelectionArray.length > 0 )         {            setTimeout( "gCalendarWindow.multiweekView.clearSelectedDate();", 1 );            var i = 0;                        for( i = 0; i < EventSelectionArray.length; i++ )            {               var EventBoxes;               if( EventSelectionArray[i].due ) 		 {		   EventBoxes = document.getElementsByAttribute( "name", "multiweek-view-todo-box-"+EventSelectionArray[i].id );		   		 }	       else		 {		   EventBoxes = document.getElementsByAttribute( "name", "multiweek-view-event-box-"+EventSelectionArray[i].id );		 }               for ( j = 0; j < EventBoxes.length; j++ )                {                  EventBoxes[j].setAttribute( "eventselected", "true" );               }            }         }         else         {            //select the proper day            gCalendarWindow.multiweekView.hiliteSelectedDate();         }      }   }         calendarWindow.EventSelection.addObserver( multiweekViewEventSelectionObserver );      // set up day box's and day number text items, see notes above      this.dayNumberItemArray = new Array();   this.dayBoxItemArray = new Array();   this.weekNumberItemArray = new Array();   this.kungFooDeathGripOnEventBoxes = new Array();   this.firstDateOfView = new Date();   this.lastDateOfView = new Date();   // Get the default number of WeeksInView   this.categoriesStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties");   var defaultWeeksInView = this.categoriesStringBundle.GetStringFromName("defaultWeeksInView" );   var WeeksInView = getIntPref(this.calendarWindow.calendarPreferences.calendarPref, "weeks.inview", defaultWeeksInView );   this.WeeksInView = ( WeeksInView >= 6 ) ? 6 : WeeksInView ;   var dayItemIndex = 0;    for( var weekIndex = 1; weekIndex <= 6; ++weekIndex )   {     var weekNumberItem = document.getElementById( "multiweek-week-" + weekIndex + "-left" );     this.weekNumberItemArray[ weekIndex ] = weekNumberItem;       for( var dayIndex = 1; dayIndex <= 7; ++dayIndex )      {         // add the day text item to an array[0..41]                  var dayNumberItem = document.getElementById( "multiweek-week-" + weekIndex + "-day-" + dayIndex );         this.dayNumberItemArray[ dayItemIndex ] = dayNumberItem;                  // add the day box to an array[0..41]                  var dayBoxItem = document.getElementById( "multiweek-week-" + weekIndex + "-day-" + dayIndex + "-box" );         this.dayBoxItemArray[ dayItemIndex ] = dayBoxItem;                  // set on click of day boxes                  dayBoxItem.setAttribute( "onclick", "gCalendarWindow.multiweekView.clickDay( event )" );         dayBoxItem.setAttribute( "oncontextmenu", "gCalendarWindow.multiweekView.contextClickDay( event )" );         //set the drop         dayBoxItem.setAttribute( "ondragdrop", "nsDragAndDrop.drop(event,monthViewEventDragAndDropObserver)" );         dayBoxItem.setAttribute( "ondragover", "nsDragAndDrop.dragOver(event,monthViewEventDragAndDropObserver)" );                  //set the double click of day boxes         dayBoxItem.setAttribute( "ondblclick", "gCalendarWindow.multiweekView.doubleClickDay( event )" );         // array index                  ++dayItemIndex;      }   }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/4d83c28abdf92a3318a9c1ab5072e58054a2f6e1/multiweekView.js/buggy/calendar/resources/content/multiweekView.js