Hi Jeremy,
Thanks for taking the time to respond. I did try your code as well (your blog post put me on to this problem with dialogs in the first place) but unfortuntaly I still had the same problem. It seems strange that if I move the code into an xpage directly and out of the custom control I don't receive the problem anymore? The other strange thing is why IE7 only?