In addition to Solution 1:
Use, for example,
http://jqueryui.com/dialog[
^].
Not only it gives you all the control you need, it also allow you to get rid of pop-ups. Pop-ups are very irritating to most users. First of all, they are ugly by themselves, because their multiply open windows without user's control, but a lot of pop-up use in advertizement made them intolerable. That's why many users will block them, usually using browser's plug-ins developed for this purpose.
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[
^],
http://jquery.com[
^],
http://learn.jquery.com[
^],
http://learn.jquery.com/using-jquery-core[
^],
http://learn.jquery.com/about-jquery/how-jquery-works[
^] (start from here).
—SA