I think it may be nice to use the same pattern of Filmstrip to hook functions to a named object instead of window. That makes other easy to understand the place these functions defined. Maybe, something like ConfirmDialog.confirmImage and ConfirmDialog.confirmVideo.