change js document crap dialogs to pages