Matrix of checkboxes - only 1 allowed in a row
Assuming an unchecked starting condition you can eliminate a parameter and thus drop the conditional:

function switch_checkbox(id_pair)
{
    document.getElementById(id_pair).checked = false;
}


...

&lt;input type="checkbox" name="group1[]" id="1-1" value="1-1" onChange="switch_checkbox('1-2');"/&gt;