Create navigation.js

add javascript file containing functions that handle navigation.