Here's a javascript function you can use. Just call it for each id belonging to the fields in question.
function isEmpty(field_id) {
var empty = false;
if (document.getElementById(field_id).value == null)
empty = true;
if (document.getElementById(field_id).value == "")
empty = true;
return empty;
}
If you have them predictably named, you could call this function in a loop. If, for instance, they were named field1, field2, ..., field23, then you could just have the following in your main code body:
for (i = 0; i < 24; i++) {
var emptyCheck = false;
if(isEmpty("field"+i)) {
emptyCheck = true;
//do whatever you want to do when a value is empty
}
}