You could wrap the list of checkboxes in a container (e.g. a <div>) with a known ID:
<div id="myCheckboxes">
<input type="checkbox" ...>
<!-- ... -->
<input type="checkbox" ...>
</div>
And then in JavaScript do:
function isOneChecked(containerId) {
var myDiv = document.getElementByID(containerId);
if (myDiv != null) {
var checkBoxes = myDiv.getElementsByTagName("INPUT");
for (var i=0; i<checkBoxes.length; i++) {
if (checkBoxes[i].checked == true) {
return true;
}
}
}
return false;
}
and call it as:
if (isOneChecked("myCheckboxes")) {
// whatever
}