javascript fixed with 2 new pages