move all dialogs to dialogs.js, add utility for viewing them