add: setSortByMenuItemCheckState("sortByAttachmentsMenuitem", (sortType == nsMsgViewSortType.byAttachments)); 
context: function InitViewSortByMenu(){    var sortType = gDBView.sortType;    setSortByMenuItemCheckState("sortByDateMenuitem", (sortType == nsMsgViewSortType.byDate));    setSortByMenuItemCheckState("sortByFlagMenuitem", (sortType == nsMsgViewSortType.byFlagged));    setSortByMenuItemCheckState("sortByOrderReceivedMenuitem", (sortType == nsMsgViewSortType.byId));    setSortByMenuItemCheckState("sortByPriorityMenuitem", (sortType == nsMsgViewSortType.byPriority));    setSortByMenuItemCheckState("sortBySizeMenuitem", (sortType == nsMsgViewSortType.bySize));    setSortByMenuItemCheckState("sortByStatusMenuitem", (sortType == nsMsgViewSortType.byStatus));    setSortByMenuItemCheckState("sortBySubjectMenuitem", (sortType == nsMsgViewSortType.bySubject));    setSortByMenuItemCheckState("sortByUnreadMenuitem", (sortType == nsMsgViewSortType.byUnread));    setSortByMenuItemCheckState("sortByLabelMenuitem", (sortType == nsMsgViewSortType.byLabel));    setSortByMenuItemCheckState("sortByJunkStatusMenuitem", (sortType == nsMsgViewSortType.byJunkStatus));    setSortByMenuItemCheckState("sortBySenderMenuitem", (sortType == nsMsgViewSortType.byAuthor));    setSortByMenuItemCheckState("sortByRecipientMenuitem", (sortType == nsMsgViewSortType.byRecipient));    var sortOrder = gDBView.sortOrder;    var sortTypeSupportsGrouping = (sortType == nsMsgViewSortType.byAuthor         || sortType == nsMsgViewSortType.byDate || sortType == nsMsgViewSortType.byPriority        || sortType == nsMsgViewSortType.bySubject || sortType == nsMsgViewSortType.byLabel        || sortType == nsMsgViewSortType.byRecipient);    setSortByMenuItemCheckState("sortAscending", (sortOrder == nsMsgViewSortOrder.ascending));    setSortByMenuItemCheckState("sortDescending", (sortOrder == nsMsgViewSortOrder.descending));    var grouped = ((gDBView.viewFlags & nsMsgViewFlagsType.kGroupBySort) != 0);    var threaded = ((gDBView.viewFlags & nsMsgViewFlagsType.kThreadedDisplay) != 0 && !grouped);    var sortThreadedMenuItem = document.getElementById("sortThreaded");    var sortUnthreadedMenuItem = document.getElementById("sortUnthreaded");    sortThreadedMenuItem.setAttribute("checked", threaded);    sortUnthreadedMenuItem.setAttribute("checked", !threaded && !grouped);    sortThreadedMenuItem.setAttribute("disabled", !gDBView.supportsThreading);    sortUnthreadedMenuItem.setAttribute("disabled", !gDBView.supportsThreading);    var groupBySortOrderMenuItem = document.getElementById("groupBySort");    groupBySortOrderMenuItem.setAttribute("disabled", !gDBView.supportsThreading || !sortTypeSupportsGrouping);    groupBySortOrderMenuItem.setAttribute("checked", grouped);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f7cb6ff817adc467cd7c4bb0005357f8afa390f0/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js