rem:  var templateNode = awGetTreeItem(1); 
add: var templateNode = treeChildren.firstChild;  
context: function CompFields2Recipients(msgCompFields, msgType){	if (msgCompFields)	{	    var treeChildren = document.getElementById('addressWidgetBody');	    var newTreeChildrenNode = treeChildren.cloneNode(false);//	    var templateNode = treeChildren.firstChild();  // doesn't work!	    var templateNode = awGetTreeItem(1);	    				awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.GetReplyTo(), false), "addr_reply", newTreeChildrenNode, templateNode);		awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.GetTo(), false), "addr_to", newTreeChildrenNode, templateNode);		awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.GetCc(), false), "addr_cc", newTreeChildrenNode, templateNode);		awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.GetBcc(), false), "addr_bcc", newTreeChildrenNode, templateNode);		awSetInputAndPopup(msgCompFields.GetOtherRandomHeaders(), "addr_other", newTreeChildrenNode, templateNode);		awSetInputAndPopup(msgCompFields.GetNewsgroups(), "addr_newsgroups", newTreeChildrenNode, templateNode);		awSetInputAndPopup(msgCompFields.GetFollowupTo(), "addr_followup", newTreeChildrenNode, templateNode);		        if (top.MAX_RECIPIENTS == 0)		    top.MAX_RECIPIENTS = 1;		else		{		    //If it's a new message, we need to add an extrat empty recipient.		    var msgComposeType = Components.interfaces.nsIMsgCompType;		    if (msgType == msgComposeType.New)		        _awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode);//	        var parent = treeChildren.parentNode();     // doesn't work!	        var parent = document.getElementById('addressingWidgetTree')	        parent.replaceChild(newTreeChildrenNode, treeChildren);            setTimeout("awFinishCopyNodes();", 0);        }	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/1e5a0147f2697a453f20c61f531d08e50dc09179/addressingWidgetOverlay.js/clean/mailnews/compose/resources/content/addressingWidgetOverlay.js