Convert JS alerts to CSS dialogs in aptmt editor