Thanks for the example Adam, however this uses the window.open() function as appose to the window.showModalDialog() function and it is the window.showModalDialog(); function that is causing the problem.
If you change the code in your example code above you will be able to recreate my problem.
Thanks,