fix add javascript to display or hide fields