added javascript for navigating pages