add: calListItems[i+1].childNodes[0].setAttribute("class", "calendar-list-item-class " + containerName); } 
context: function calendarInit() {	// get the calendar event data source   gEventSource = new CalendarEventDataSource();      // get the Ical Library   gICalLib = gEventSource.getICalLib();   // this suspends feedbacks to observers until all is settled   gICalLib.batchMode = true;      // set up the CalendarWindow instance      gCalendarWindow = new CalendarWindow();      //when you switch to a view, it takes care of refreshing the events, so that call is not needed.   gCalendarWindow.currentView.switchTo( gCalendarWindow.currentView );   // set up the checkboxes variables   gOnlyWorkdayChecked = document.getElementById( "only-workday-checkbox-1" ).getAttribute("checked") ;   gDisplayToDoInViewChecked = document.getElementById( "display-todo-inview-checkbox-1" ).getAttribute("checked") ;   // set up the unifinder      prepareCalendarUnifinder();   prepareCalendarToDoUnifinder();      update_date();   		checkForMailNews();   // Change made by CofC for Calendar Coloring   // initialize calendar color style rules in the calendar's styleSheet   // find calendar's style sheet index   var i;   for (i=0; i<document.styleSheets.length; i++)   {      if (document.styleSheets[i].href.match(/chrome.*\/skin.*\/calendar.css$/))	  {          gCalendarStyleSheet = document.styleSheets[i];		  break;	  }   }   var calendarNode;   var containerName;   var calendarColor;   // loop through the calendars via the rootSequence of the RDF datasource   var seq = gCalendarWindow.calendarManager.rdf.getRootSeq("urn:calendarcontainer");   var list = seq.getSubNodes();   for(i=0; i<list.length;i++)   {     calendarNode = gCalendarWindow.calendarManager.rdf.getNode( list[i].subject );          // grab the container name and use it for the name of the style rule     containerName = list[i].subject.split(":")[2];	 // obtain calendar color from the rdf datasource     calendarColor = calendarNode.getAttribute("http://home.netscape.com/NC-rdf#color");	 // if the calendar had a color attribute create a style sheet for it     if (calendarColor != null)       gCalendarStyleSheet.insertRule("." + containerName + " { background-color:" + calendarColor + "!important;}", 1);   }   // CofC Calendar Coloring Change   if( ("arguments" in window) &&       (window.arguments.length) &&       (typeof(window.arguments[0]) == "object") &&       ("channel" in window.arguments[0]) )   {      gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].channel );   }   //a bit of a hack since the menulist doesn't remember the selected value        var value = document.getElementById( 'event-filter-menulist' ).value;   document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value );   gEventSource.alarmObserver.firePendingAlarms();   //All is settled, enable feedbacks to observers   gICalLib.batchMode = false;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/34eaf5125c21ecde4d3ab955494d570c0616dd54/calendar.js/buggy/calendar/resources/content/calendar.js