rem: for (var i = node.childNodes.length - 1; i >= 0; i--) { node.removeChild(node.childNodes[i]); 
add: while (node.hasChildNodes()) { node.removeChild(node.lastChild); 
context: function cvAddAddressNodes(node, uri){  var visible = false;	if ( node )	{    var displayName = "";     var address = "";    var editList = GetDirectoryFromURI(uri);    var addressList = editList.addressLists;          if (addressList) {      var total = addressList.Count();      if (total > 0) {        for (var i = node.childNodes.length - 1; i >= 0; i--) {          node.removeChild(node.childNodes[i]);        }        for (i = 0;  i < total; i++ ) {      		var descNode = document.createElement("description");             address = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).primaryEmail;              displayName = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).displayName;            descNode.setAttribute("class", "CardViewLink");          node.appendChild(descNode);                             var linkNode = document.createElementNS("http://www.w3.org/1999/xhtml", "a");          linkNode.setAttribute("id", "addr#" + i);          linkNode.setAttribute("href", "mailto:" + address);          descNode.appendChild(linkNode);                    var textNode = document.createTextNode(displayName + " <" + address + ">");          linkNode.appendChild(textNode);        }			  visible = true;      }		}    		cvSetVisible(node, visible);	}	return visible;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/26cdb24398282987c2afbd83349e8203022ac384/abCardViewOverlay.js/clean/mail/components/addrbook/content/abCardViewOverlay.js