rem: var currentIndex; 
add: if (!messageUri)       messageUri = GetFirstSelectedMessage(); 
context: function MsgOpenNewWindowForMessage(messageUri, folderUri){    var currentIndex;    if (!messageUri || !folderUri) {        var outlinerView = gDBView.QueryInterface(Components.interfaces.nsIOutlinerView);        var outlinerSelection = outlinerView.selection;        currentIndex = outlinerSelection.currentIndex;    }    if (!messageUri) {        messageUri = gDBView.getURIForViewIndex(currentIndex);    }    if (!folderUri) {        folderUri = gDBView.getFolderForViewIndex(currentIndex).URI;    }    // be sure to pass in the current view....    if (messageUri && folderUri) {        window.openDialog( "chrome://messenger/content/messageWindow.xul", "_blank", "all,chrome,dialog=no,status,toolbar", messageUri, folderUri, gDBView );    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/218064aa3badb87fbbe82d1ad9ea3eb84a4c3f3d/mailWindowOverlay.js/buggy/mailnews/base/resources/content/mailWindowOverlay.js