created javascript for clickable table