rem: var max = body.childNodes.length - 1; while (max >= 0) { body.removeChild( body.childNodes[max]); max--; 
add: while (body.hasChildNodes()) { body.removeChild(body.lastChild); 
context: function ListModules() {  if (top.importService == null)    return;  var body = document.getElementById( "moduleList");  var max = body.childNodes.length - 1;  while (max >= 0) {    body.removeChild( body.childNodes[max]);    max--;  }  var count = top.importService.GetModuleCount(top.importType);  var i;  var moduleArray = new Array(count);  for (i = 0; i < count; i++) {    moduleArray[i] = {name:top.importService.GetModuleName(top.importType, i), index:i };  }  // sort the array of modules by name, so that they'll show up in the right order  moduleArray.sort(CompareImportModuleName);  for (i = 0; i < count; i++) {    AddModuleToList(moduleArray[i].name, moduleArray[i].index);  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/26cdb24398282987c2afbd83349e8203022ac384/importDialog.js/buggy/mailnews/import/resources/content/importDialog.js