rem: var viewFlags = gDBView.viewFlags; var viewType = gDBView.viewType; 
add: var viewFlags = (gDBView) ? gDBView.viewFlags : 0; var viewType = (gDBView) ? gDBView.viewType : 0; 
context: function InitViewMessagesMenu(){  var viewFlags = gDBView.viewFlags;  var viewType = gDBView.viewType;  var allMenuItem = document.getElementById("viewAllMessagesMenuItem");  if(allMenuItem)      allMenuItem.setAttribute("checked",  (viewFlags & nsMsgViewFlagsType.kUnreadOnly) == 0 && (viewType == nsMsgViewType.eShowAllThreads));  var unreadMenuItem = document.getElementById("viewUnreadMessagesMenuItem");  if(unreadMenuItem)      unreadMenuItem.setAttribute("checked", (viewFlags & nsMsgViewFlagsType.kUnreadOnly) != 0);  var theadsWithUnreadMenuItem = document.getElementById("viewThreadsWithUnreadMenuItem");  if(theadsWithUnreadMenuItem)      theadsWithUnreadMenuItem.setAttribute("checked", viewType == nsMsgViewType.eShowThreadsWithUnread);  var watchedTheadsWithUnreadMenuItem = document.getElementById("viewWatchedThreadsWithUnreadMenuItem");  if(watchedTheadsWithUnreadMenuItem)      watchedTheadsWithUnreadMenuItem.setAttribute("checked", viewType == nsMsgViewType.eShowWatchedThreadsWithUnread);    var ignoredTheadsMenuItem = document.getElementById("viewIgnoredThreadsMenuItem");  if(ignoredTheadsMenuItem)      ignoredTheadsMenuItem.setAttribute("checked", (viewFlags & nsMsgViewFlagsType.kShowIgnored) != 0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f13ab53d57ea19d684c8d0a605fb1e54582c8aca/mailWindowOverlay.js/clean/mail/base/content/mailWindowOverlay.js