context: function showCalendarView(type){    // If we got this call while a mail-view is being shown, we need to    // hide all of the mail stuff so we have room to display the calendar    var calendarViewBox = document.getElementById("calendar-view-box");    if (calendarViewBox.style.visibility == "collapse") {        collapseElement(GetMessagePane());        collapseElement(document.getElementById("threadpane-splitter"));        var searchBox = findMailSearchBox();        if (searchBox) {            collapseElement(searchBox);        }        uncollapseElement(calendarViewBox);        // Thunderbird is smart.  It won't reload the message list if the user        // clicks the same folder that's already selected.  Therefore, we need        // to not only remove the tree selection (so clicking triggers an event)        // but also reset some of TB's internal variables.        var treeSel = document.getElementById("folderTree").view.selection;        treeSel.selectEventsSuppressed = true;        treeSel.clearSelection();        treeSel.selectEventsSuppressed = false;        gMsgFolderSelected = null;        msgWindow.openFolder = null;    }    document.getElementById("displayDeck").selectedPanel =  calendarViewBox;    var calendarViewBox = document.getElementById("calendar-view-box");    var selectedDay;    try {        var selectedDay = calendarViewBox.selectedPanel.selectedDay;    } catch(ex) {} // This dies if no view has even been chosen this session    if (!selectedDay)        selectedDay = today();    calendarViewBox.selectedPanel = document.getElementById(type+"-view");    var view = calendarViewBox.selectedPanel;    if (view.displayCalendar != getCompositeCalendar()) {        view.displayCalendar = getCompositeCalendar();        view.timezone = calendarDefaultTimezone();        view.controller = ltnCalendarViewController;    }    view.goToDay(selectedDay);    // Set the labels for the context-menu    var nextCommand = document.getElementById("context_next");    nextCommand.setAttribute("label", nextCommand.getAttribute("label-"+type));    var previousCommand = document.getElementById("context_previous")    previousCommand.setAttribute("label", previousCommand.getAttribute("label-"+type));}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/67f9d85622b78fba73d946fd9591b42ff2498878/messenger-overlay-sidebar.js/buggy/calendar/lightning/content/messenger-overlay-sidebar.js