rem: } else {   if (list[0].value == newSelection.value) {  var found = false;   for (i = 1; i < list.length && !found; i++) {  if (list[i].checked == true) {  if (list[i].value != item.value) {  list[0].value = list[i].value;  found = true; } } }   if (!found) {   list[0].value = ""; } } }   
context:   function GridSphere_CheckBoxList_onClick(list, newSelection)  {    // alert("GridSphere CheckBoxList On Click");    // alert("GridSphere CheckBoxList current selection: " + list[0].value);    if (newSelection.checked == true) {      // Save selection only if none made yet      if (list[0].value == "") {        list[0].value = newSelection.value;      }    } else {      // If saved selection was this one      if (list[0].value == newSelection.value) {        var found = false;        // Set selection to first checked item other than this        for (i = 1; i < list.length && !found; i++) {          if (list[i].checked == true) {            if (list[i].value != item.value) {              list[0].value = list[i].value;              found = true;            }          }        }        // If we didn't find a checked value        if (!found) {          // Set selection to none          list[0].value = "";        }      }    }    // alert("GridSphere CheckBoxList new selection: " + selection.value);  }
meta: 3685	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3685/3c37e5e24d572205c2e1f58cae5a38ea8c536bc5/gridsphere.js/buggy/webapps/gridsphere/javascript/gridsphere.js