set up javascript for checkbox logic