move javascript for radio buttons to its own file