Merged in changes from Jacques:
Submitted variable will be set to "false" each time a new dialog will be created.
Added date-mask to datepicker fields.