rem: function CustomizeApplicationToolbar(id) { debugger; 
add: function CustomizeApplicationToolbar(id) { 
context: function CustomizeApplicationToolbar(id){debugger;  // the following code operates different whether  // or not we're actually customizing the mode toolbar or  // any other toolbar.  gCustomizeId = id;  var isModeToolbox = (id == 'mode-toolbox');  var modeName = isModeToolbox ? 'mode' : ltnCurrentMode();  // retrieve the toolbars from the tree  var mailbar = getMailBar();  var menubar = document.getElementById('mail-menubar');  var calendarbar = document.getElementById('calendar-toolbar');  var mailbox = document.getElementById("mail-toolbox");  var modebar = document.getElementById('mode-toolbar');  var modebox = document.getElementById('mode-toolbox');  // install the callback that handles what needs to be  // done after a toolbar has been customized.  mailbox.customizeDone = ModeToolboxCustomizeDone;  modebox.customizeDone = ModeToolboxCustomizeDone;  // disable elements on the toolbars  if (isModeToolbox) {    EnableDisableHierarchy(menubar,true);    EnableDisableHierarchy(mailbar,true);    EnableDisableHierarchy(calendarbar,true);  } else {    EnableDisableHierarchy(modebar,true);  }  var customizePopup = document.getElementById("CustomizeMailToolbar");   customizePopup.setAttribute("disabled", "true");  var wintype = document.documentElement.getAttribute("windowtype");  wintype = wintype.replace(/:/g, "");  // lightning install a new dropdown list in the customize dialog  // which allows to switch to all available toolbars while still  // being in the dialog. in case a new entry has been selected this  // function will be called. the argument will "mode", "mail",  // "calendar" or "task".  var onModeSwitch = function switchHandler(aMode) {        // assume that we're switching to the mode toolbar    var toolbox = 'mode-toolbox';    // check which toolbar is to be customized next    // and possibly switch the the appropriate mode.        if(aMode == 'mail') {      ltnSwitch2Mail();      toolbox = 'mail-toolbox';    } else if(aMode == 'calendar') {      ltnSwitch2Calendar();      toolbox = 'mail-toolbox';    }    // enable/disable all toolbar to reflect the new state    var isMode = (aMode == 'mode');    EnableDisableHierarchy(modebar,!isMode);    EnableDisableHierarchy(menubar,isMode);    EnableDisableHierarchy(mailbar,isMode);    EnableDisableHierarchy(calendarbar,isMode);        // remember the current toolbox    gCustomizeId = toolbox;        // return this appropriate toolbox element    return document.getElementById(toolbox);  };  // open the customize toolbar dialog now...  window.openDialog("chrome://global/content/customizeToolbar.xul",                    "CustomizeToolbar"+wintype,                    "chrome,all,dependent",                      document.getElementById(id),  // toolbar dom node                      isModeToolbox,                // is mode toolbar yes/no?                      onModeSwitch,                 // callback function                      modeName);                    // name of this mode}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/49d99658257e01d5bb14d94382a0b2604eb4fa45/messenger-overlay-toolbar.js/buggy/calendar/lightning/content/messenger-overlay-toolbar.js