There's a bunch of jQuery plugins that will handle modal windows for you. Personally, I've used SimpleModal with great success.
You could always bake your own relatively easily, but popular plugins will often obfuscate the issues with cross-browser positioning, and offer you additional flexibility.