ShowModalDialog Polyfill
Initial implementation https://github.com/niutech/showModalDialog
Updated features and fixed bugs https://github.com/macmessa/showModalDialog/tree/multiple-dialog
DarkSide666 - additional compatibility issues fixed, added up-to-date demos etc.
For usage examples see demo.html and demo-strict.html files. If you don't need to support Internet Explorer, then demo-strict.html is the way to go. Otherwise you will have to use eval version which is implemented in demo.html, but that will not be supported for FireFox and possibly other modern browsers in future too.