a simple modal dialog written in pure javascript