top.controllers.insertControllerAt(0, CalendarController);  
function ltnOnLoad(event){    gMiniMonthLoading = true;    var today = new Date();    var nextmo = nextMonth(today);    document.getElementById("ltnMinimonth").value = today;    gMiniMonthLoading = false;    // nuke the onload, or we get called every time there's    // any load that occurs    document.removeEventListener("load", ltnOnLoad, true);    // Hide the calendar view so it doesn't push the status-bar offscreen    collapseElement(document.getElementById("calendar-view-box"));    // Start observing preferences    var prefService = Components.classes["@mozilla.org/preferences-service;1"]                            .getService(Components.interfaces.nsIPrefService);    var rootPrefBranch = prefService.getBranch("");    ltnPrefObserver.rootPrefBranch = rootPrefBranch;    var pb2 = rootPrefBranch.QueryInterface(        Components.interfaces.nsIPrefBranch2);    pb2.addObserver("calendar.", ltnPrefObserver, false);    ltnPrefObserver.observe(null, null, "");    // fire up the alarm service    var alarmSvc = Components.classes["@mozilla.org/calendar/alarm-service;1"]                   .getService(Components.interfaces.calIAlarmService);    alarmSvc.timezone = calendarDefaultTimezone();    alarmSvc.startup();    // Add an unload function to the window so we don't leak the pref observer    document.getElementById("messengerWindow")            .addEventListener("unload", ltnFinish, false);    document.getElementById("displayDeck")            .addEventListener("dayselect", observeViewDaySelect, false);    // Make sure we update ourselves if the program stays open over midnight    scheduleMidnightUpdate(refreshUIBits);    if (getPrefSafe("calendar.prototypes.wcap", false)) {        document.loadOverlay(            "chrome://lightning/content/sun-messenger-overlay-sidebar.xul",            null);    }    return;}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/a228a849a6153e40e219d3f6054e05b8653b9d6b/messenger-overlay-sidebar.js/buggy/calendar/lightning/content/messenger-overlay-sidebar.js