basic viewer modal open/close functions