add javascript functions for radio button and their dependant controls