I am using basic HTML `table`'s and `input` checkbox fields here.

This is what I want to accomplish with Javascript:

The second column of a table has one checkbox. The third column contains "sub options" of the second column. Each row is independent.

If I unselect a checkbox in the `<td>`, 2nd column, I want to deselect all of the check boxes in the `<td>` directly to the right (the sub options in the 3rd column).

I also want to do the opposite; if you select the first checkbox, it will check all of the ones in the sub options that are not checked.

Pseudo-Code ideas:

```
if checkbox checked:
  uncheck child input's in td `id`

```

OR 

```
if checkbox checked:
   uncheck <check box one `id'>
   uncheck <check box two `id'>
   uncheck <check box three `id'>
   etc

```

The second option seems much more tedious. Will the first work?