rem: var tree = GetThreadTree();  var messageList = tree.selectedItems; messenger.forwardMessages(messageList, -1); 
add: var prefs = Components.classes['component: prefs = prefs.QueryInterface(Components.interfaces.nsIPref); var forwardType = 0; try { var forwardType = prefs.GetIntPref("mail.forward_message_mode"); } catch (e) {dump ("faild to retrive pref mail.forward_message_mode");}  if (forwardType == 0) MsgForwardAsAttachment(null); else MsgForwardAsInline(null); 
context: function MsgForwardMessage(event){  dump("\nMsgForwardMessage from XUL\n");  var tree = GetThreadTree();  //get the selected elements  var messageList = tree.selectedItems;  messenger.forwardMessages(messageList, -1);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e45c32906aaa739902fe0dd97005590b43fc260d/widgetglue.js/buggy/mailnews/base/resources/content/widgetglue.js