context: function CCKWriteConfigFile(destdir){  var file = destdir.clone();  file.append("cck.config");               var fos = Components.classes["@mozilla.org/network/file-output-stream;1"]                       .createInstance(Components.interfaces.nsIFileOutputStream);  fos.init(file, -1, -1, false);  var elements = document.getElementsByAttribute("id", "*")  for (var i=0; i < elements.length; i++) {    if ((elements[i].nodeName == "textbox") ||        (elements[i].nodeName == "radiogroup") ||        (elements[i].nodeName == "checkbox") ||        (elements[i].id == "RootKey1") ||        (elements[i].id == "Type1")) {      if ((elements[i].id != "saveOnExit") && (elements[i].id != "zipLocation")) {        var line = elements[i].getAttribute("id") + "=" + elements[i].value + "\n";        fos.write(line, line.length);      }    } else if (elements[i].id == "prefList") {      listbox = document.getElementById('prefList');          for (var j=0; j < listbox.getRowCount(); j++) {        listitem = listbox.getItemAtIndex(j);        var line = "PreferenceName" + (j+1) + "=" + listitem.label + "\n";        fos.write(line, line.length);        var line = "PreferenceValue" + (j+1) + "=" + listitem.value + "\n";        fos.write(line, line.length);            }    } else if (elements[i].id == "regList") {      listbox = document.getElementById('regList');          for (var j=0; j < listbox.getRowCount(); j++) {        listitem = listbox.getItemAtIndex(j);        var line = "RegName" + (j+1) + "=" + listitem.label + "\n";        fos.write(line, line.length);        var line = "RootKey" + (j+1) + "=" + listitem.rootkey + "\n";        fos.write(line, line.length);        var line = "Key" + (j+1) + "=" + listitem.key + "\n";        fos.write(line, line.length);        var line = "Name" + (j+1) + "=" + listitem.name + "\n";        fos.write(line, line.length);        var line = "NameValue" + (j+1) + "=" + listitem.namevalue + "\n";        fos.write(line, line.length);        var line = "Type" + (j+1) + "=" + listitem.type + "\n";        fos.write(line, line.length);      }    } else if (elements[i].id == "searchPluginList") {      listbox = document.getElementById('searchPluginList');          for (var j=0; j < listbox.getRowCount(); j++) {        listitem = listbox.getItemAtIndex(j);        var line = "SearchPlugin" + (j+1) + "=" + listitem.childNodes[1].value + "\n";        fos.write(line, line.length);        var line = "SearchPluginIcon" + (j+1) + "=" + listitem.childNodes[0].value + "\n";        fos.write(line, line.length);            }    }  }  fos.close();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/e9a51a32bc6f9b73a6ef72ef8ec7e8b46437de4c/cckwizard.js/clean/extensions/cck/browser/resources/content/cckwizard/cckwizard.js