rem: for (var i = 0; i < numMessages; i++) { MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[i]),dbView.getFolderForViewIndex(indices[i]).URI); 
add:  gWindowReuse = gPrefs.getBoolPref("mailnews.reuse_message_window");         if ((gWindowReuse) && (numMessages == 1)) { if (!MsgOpenExistingWindowForMessage(gWindowID,dbView.getURIForViewIndex(indices[0]))) { gWindowID = MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[0]),dbView.getFolderForViewIndex(indices[0]).URI); } } else { for (var i = 0; i < numMessages; i++) { gWindowID = MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[i]),dbView.getFolderForViewIndex(indices[i]).URI); } 
context: function MsgOpenSelectedMessages(){  var dbView = GetDBView();  var indices = GetSelectedIndices(dbView);  var numMessages = indices.length;  for (var i = 0; i < numMessages; i++) {    MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[i]),dbView.getFolderForViewIndex(indices[i]).URI);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5288d19e7aa708b03c833a9f9aebb9c68327d7e2/mailWindowOverlay.js/buggy/mailnews/base/resources/content/mailWindowOverlay.js