add:  var proxyintegerlist = ["ProxyType"];  for (i = 0; i < proxyintegerlist.length; i++) { var proxyitem = document.getElementById(proxyintegerlist[i]); if (proxyitem.value.length > 0) { var line = 'pref("' + proxyitem.getAttribute("preference") + '", ' + proxyitem.value + ');\n'; fos.write(line, line.length); } }  
context: function CCKWriteDefaultJS(destdir){  var throbber1 = 'pref("browser.throbber.url",            "chrome://cck/content/cck.properties");\n';  var homepage1 = 'pref("browser.startup.homepage",        "chrome://cck/content/cck.properties");\n';  var homepage2 = 'pref("browser.startup.homepage_reset",  "chrome://cck/content/cck.properties");\n';  var useragent1begin = 'pref("general.useragent.vendorComment", "CK-';  var useragent2begin = 'pref("general.useragent.extra.cck", "(CK-';  var useragent1end = '");\n';  var useragent2end = ')");\n';  var file = destdir.clone();  file.append("firefox-cck.js");               var fos = Components.classes["@mozilla.org/network/file-output-stream;1"]                       .createInstance(Components.interfaces.nsIFileOutputStream);  fos.init(file, -1, -1, false);  var logobuttonurl = document.getElementById("AnimatedLogoURL").value;  if (logobuttonurl && (logobuttonurl.length > 0)) {    fos.write(throbber1, throbber1.length);  }  var browserstartuppage = document.getElementById("HomePageURL").value;  if (browserstartuppage && (browserstartuppage.length > 0)) {    fos.write(homepage1, homepage1.length);    fos.write(homepage2, homepage2.length);      }    var useragent = document.getElementById("OrganizationName").value;  if (useragent && (useragent.length > 0)) {    fos.write(useragent1begin, useragent1begin.length);    fos.write(useragent, useragent.length);    fos.write(useragent1end, useragent1end.length);    fos.write(useragent2begin, useragent2begin.length);    fos.write(useragent, useragent.length);    fos.write(useragent2end, useragent2end.length);  }    // Preferences  listbox = document.getElementById("prefList");  for (var i=0; i < listbox.getRowCount(); i++) {    listitem = listbox.getItemAtIndex(i);    var listitemvalue = listitem.value;    if ((listitemvalue == "FALSE") || (listitemvalue == "TRUE")) {      listitemvalue = listitemvalue.toLowerCase()        }    var line = 'pref("' + listitem.label + '", ' + listitemvalue + ');\n';    fos.write(line, line.length);  }    var radiogroup = document.getElementById("ProxyType");  if (radiogroup.value == "")    radiogroup.value = "0";  switch ( radiogroup.value ) {    case "1":      var proxystringlist = ["HTTPproxyname","SSLproxyname","FTPproxyname","Gopherproxyname","NoProxyname","autoproxyurl" ];        for (i = 0; i < proxystringlist.length; i++) {        var proxyitem = document.getElementById(proxystringlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", "' + proxyitem.value + '");\n';          fos.write(line, line.length);        }      }        var proxyintegerlist = ["HTTPportno","SSLportno","FTPportno","Gopherportno","socksv","ProxyType"];      for (i = 0; i < proxyintegerlist.length; i++) {        var proxyitem = document.getElementById(proxyintegerlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", ' + proxyitem.value + ');\n';          fos.write(line, line.length);        }      }        var proxyitem = document.getElementById("shareAllProxies");      var line = 'pref("' + proxyitem.getAttribute("preference") + '", ' + proxyitem.checked + ');\n';      fos.write(line, line.length);      break;    case "2":      var proxystringlist = ["autoproxyurl" ];        for (i = 0; i < proxystringlist.length; i++) {        var proxyitem = document.getElementById(proxystringlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", "' + proxyitem.value + '");\n';          fos.write(line, line.length);        }      }      break;  }  fos.close();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/cd3ddc4629f9bde4b34c223a1b149ba3ad594237/cckwizard.js/buggy/extensions/cck/browser/resources/content/cckwizard/cckwizard.js