Dialog windows open conditionally

Dialog windows don't load their own scripts, anymore.