implemented javascript for course selection