As a user, I find modal dialogs very annoying, independently of whether they appear in the browser or in any other GUI application. Nice JS and all, but please think twice (or better thrice) before using a modal dialog.
There are usability concerns that you should consider, but that doesn’t mean there are no appropriate use cases. Anyway, you don’t have a choice when it’s a feature a client asks for.
I'm curious, can you name an appropriate use case for a modal dialog? The first few uses cases I know of that came to my mind didn't turn out to be so great after I thought a bit about them.
I think there’s a usability concern only when the dialog presented is in some way dependent on the main page, e.g. if it provides some information that requires the original context. If you’re just showing zoomed-in photographs from a gallery, for example, I don’t see a problem.