Added javascript to generate the navigation bar