context: function setCalendarManagerUI(){    var calendarList = document.getElementById("list-calendars-listbox");    var child;    while ((child = calendarList.lastChild) && (child.tagName == "listitem")) {        calendarList.removeChild(child);    }    var calmgr = getCalendarManager();    var calendars = calmgr.getCalendars({});    for each (var calendar in calendars) {        var listItem = document.createElement("listitem");        var checkCell = document.createElement("listcell");        checkCell.setAttribute("type", "checkbox");        checkCell.setAttribute("checked", true);        listItem.appendChild(checkCell);        listItem.addEventListener("click", onCalendarCheckboxClick, true);        var colorCell = document.createElement("listcell");        try {           var calColor = calmgr.getCalendarPref(calendar, 'color');           colorCell.style.background = calColor;        } catch(e) {}        listItem.appendChild(colorCell);        var nameCell = document.createElement("listcell");        nameCell.setAttribute("label", calendar.name);        listItem.appendChild(nameCell);        listItem.calendar = calendar;        calendarList.appendChild(listItem);        if (calendarList.selectedIndex == -1)            calendarList.selectedIndex = 0;        }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/59d5bb2d2d4618e3b09a98194711efb320d0ba5c/calendarManagement.js/buggy/calendar/resources/content/calendarManagement.js