rem: var groupElements = document.getElementsByAttribute( "group", "P3PLevel" ); 
add: var groupElements = level.getElementsByTagName("radio"); 
context: function doCustomize() {  // Save the current settings so that we can check if the customize window changed  // any of them.  var savedSettings = [false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,                       false, false, false, false, false, false, false, false, false, false, false, false, false, false];  for (var i = 0; i < settingIDs.length; i++) {    savedSettings[i] = document.getElementById( settingIDs[i] ).checked;  }  // Open the customize window.  window.openDialog("chrome://communicator/content/pref/pref-P3Pcust.xul","P3Pcust","modal=yes,chrome,resizable=yes",                    "custombox");  // Check if any settings were changed.  var settingChanged = false;  for (var i = 0; (i < settingIDs.length) && !settingChanged; i++) {    settingChanged = savedSettings[i] != document.getElementById( settingIDs[i] ).checked;  }  // If any of the settings changed, enable and set the "Custom" radio button  // (uncheck the current radio button first).  if (settingChanged) {    // Rather than try to figure out which radio button is currently checked in    // order to uncheck it, we just get all the radio buttons in the group and uncheck them all.    var level = document.getElementById( "P3PLevel" );    var groupElements = document.getElementsByAttribute( "group", "P3PLevel" );    for( var i = 0; i < groupElements.length; i++ ) {      if( groupElements[i] != level && groupElements[i].checked ) {        groupElements[i].checked = false;        groupElements[i].removeAttribute( "checked" );      }    }    // Enable the "Custom" radio button and check it.    var custradio = document.getElementById( "custradio" );    custradio.removeAttribute("disabled");    custradio.setAttribute("checked", "true");    // Set the radio group's data index to the one for the custom button.    level.setAttribute( "data", "3" );  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/20311b8044d569afbd52e60efc219d8470b1b17c/pref-P3P.js/buggy/extensions/p3p/resources/content/pref-P3P.js