add: if (doAdd == false && i < oldTotal) { for (j = i; j < oldTotal; j++) mailList.addressLists.RemoveElementAt(j); } 
context: function GetListValue(mailList, doAdd){	mailList.listName = document.getElementById('ListName').value;	if (mailList.listName.length == 0)	{		var strBundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties");		var alertText = strBundle.GetStringFromName("emptyListName");		alert(alertText);		return false;	}	mailList.listNickName = document.getElementById('ListNickName').value;	mailList.description = document.getElementById('ListDescription').value;		var oldTotal = mailList.addressLists.Count();	var i = 1;	var pos = 0;	while ((inputField = awGetInputElement(i)))	{	    fieldValue = inputField.value;		if (doAdd || (doAdd == false && pos >= oldTotal))			var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance();		else			var cardproperty = mailList.addressLists.GetElementAt(pos);		if (cardproperty)		{			cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard);			if (cardproperty)			{				if (fieldValue != "")				{					var beginpos = fieldValue.search('<');					var endpos = fieldValue.search('>');					if (beginpos != -1)					{						beginpos++;						var newValue = fieldValue.slice(beginpos, endpos);						cardproperty.primaryEmail = newValue;					}					else						cardproperty.primaryEmail = fieldValue;					if (doAdd || (doAdd == false && pos >= oldTotal))						mailList.addressLists.AppendElement(cardproperty);					pos++;				}				else				{					if (doAdd == false)					{						cardproperty.primaryEmail = fieldValue;						pos++;					}				}			}		}	    i++;	}	return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/eabc8104c9b1462798def04119f2a10fa85ad116/abMailListDialog.js/clean/mailnews/addrbook/resources/content/abMailListDialog.js