As I mentioned, somewhat more difficult to implement; and I would suggest to drop your approach and settle for something simpler as it will stay that messy.
The JS function and server-side code I provided are probably good enough, when used together.
(The easiest algorithm, code-wise, would probably be "mark Ej checkbox somehow, set onclick handlers for all checkboxes to call function that clears other checkboxes if Ej is checked" ... I bet it can be done with no more than a few lines' change to my function, but my javascript-fu is not up for the task today)