styling and client-side code for a dialog