using javascript for nav