rem:  window.focus(); 
add:  var disabledItems = ['newNewMsgCmd', 'menu_newFolder', 'newAccountMenuItem', 'menu_close', 'menu_saveAs', 'menu_saveAsFile', 'menu_newVirtualFolder', 'menu_find', 'menu_findCmd', 'menu_findAgainCmd', 'menu_sendunsentmsgs', 'menu_subscribe', 'menu_renameFolder', 'menu_select', 'menu_selectAll', 'menu_selectThread', 'menu_favoriteFolder', 'menu_properties', 'menu_Toolbars', 'menu_MessagePaneLayout', 'menu_showMessage', 'menu_FolderViews', 'viewSortMenu', 'groupBySort', 'viewMessageViewMenu', 'mailviewCharsetMenu', 'viewMessagesMenu', 'menu_expandAllThreads', 'collapseAllThreads', 'viewheadersmenu', 'viewBodyMenu', 'viewAttachmentsInlineMenuitem', 'viewTextSizeMenu', 'menu_textZoomEnlarge', 'menu_textZoomReduce', 'goNextMenu', 'menu_nextMsg', 'menu_nextUnreadMsg', 'menu_nextUnreadThread', 'goPreviousMenu', 'menu_prevMsg', 'menu_prevUnreadMsg', 'menu_goForward', 'menu_goBack', 'goStartPage', 'newMsgCmd', 'replyMainMenu', 'replySenderMainMenu', 'replyNewsgroupMainMenu', 'menu_replyToAll', 'menu_forwardMsg', 'forwardAsMenu', 'menu_editMsgAsNew', 'openMessageWindowMenuitem', 'moveMenu', 'copyMenu', 'moveToFolderAgain', 'tagMenu', 'markMenu', 'markReadMenuItem', 'menu_markThreadAsRead', 'menu_markReadByDate', 'menu_markAllRead', 'markFlaggedMenuItem', 'menu_markAsJunk', 'menu_markAsNotJunk', 'createFilter', 'killThread', 'watchThread', 'applyFilters', 'runJunkControls', 'deleteJunk', 'menu_import', 'searchMailCmd', 'searchAddressesCmd', 'filtersCmd', 'junkMailCmd', 'cmd_close', 'minimizeWindow', 'zoomWindow']; var id; var element; for (id in disabledItems) { element = document.getElementById(disabledItems[id]); if (element) element.setAttribute("disabled", "true"); } 
context: function hiddenWindowStartup(){  // focus the hidden window  window.focus();  // Disable menus which are not appropriate  var disabledItems = ['newNewMsgCmd', 'menu_newFolder', 'newAccountMenuItem', 'menu_close',                       'menu_sendunsentmsgs', 'menu_subscribe', 'menu_renameFolder', 'menu_selectAll',                       'menu_showMessengerToolbar', 'menu_showSearchToolbar', 'menu_showTaskbar', 'menu_customizeToolbar',                       'messagePaneClassic', 'messagePaneWide', 'messagePaneVertical', 'menu_showMessage',                       'sortByDateMenuitem', 'sortByFlagMenuitem', 'sortByOrderReceivedMenuitem', 'sortByPriorityMenuitem',                       'sortBySenderMenuitem', 'sortByRecipientMenuitem', 'sortBySenderOrRecipientMenuitem', 'sortBySizeMenuitem',                       'sortByStatusMenuitem', 'sortBySubjectMenuitem', 'sortByThreadMenuitem', 'sortByUnreadMenuitem',                       'sortByTagsMenuitem', 'sortByJunkStatusMenuitem', 'sortByAttachmentsMenuitem', 'sortAscending', 'sortDescending',                       'viewThreaded', 'viewMessageViewMenu', 'viewAll', 'viewUnread', 'viewLabelMenuItem1',                       'viewUnread', 'viewLabelMenuItem1', 'viewLabelMenuItem2', 'viewLabelMenuItem3',                       'viewLabelMenuItem4', 'viewLabelMenuItem5', 'viewCreateCustomView', 'viewallheaders',                       'viewnormalheaders', 'bodyAllowHTML', 'bodySanitized', 'bodyAsPlaintext',                       'viewAttachmentsInlineMenuitem', 'goStartPage', 'newMsgCmd',                       'searchMailCmd', 'searchAddressesCmd', 'filtersCmd', 'junkMailCmd'];  for (var id in disabledItems)   {    var broadcaster = document.getElementById(disabledItems[id]);    if (broadcaster)      broadcaster.setAttribute("disabled", "true");  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/dec6e510679ff61043a71ab4109eba860eaac375/hiddenWindow.js/clean/mail/base/content/hiddenWindow.js