I"m not sure what you mean ... but try:
http://www.mattkruse.com/javascript/checkboxgroup/
I don't think you should use javascript when you can build a usable interface without it. Plus, it will only cause you more headaches in the long run (more work/more support--on something that was suppose to be an 'extra').
The below info is not for you but for the general public.
CHECKBOX
A checkbox gives the user a choice.
Checkbox options are usually opposites of each other.
If by itself, ticking a checkbox means
'yes' (positive); otherwise, it means
'no' (negative).
A checkbox can be used for selecting multiple options.
Use clear LABELS to define each option. For example, yes/no, subscribe/unsubscribe, on/off
RADIO/DROPDOWN
Used to show multiple options; but the user can only choose one.
Use checkboxes/radio buttons as much as possible. Checkboxes/radio buttons are much friendlier than dropdowns. Use dropdowns only when space is limited. Try to stay away from 'multiple select' dropdowns.