JavaScript code for dropdown navigation