Trying to use javascript to change the pages