Have you checked for jquery plugins that may fit your needs? (jquery.com)
I recently had a need for a fairly advanced js popup and found exactly what I needed there. There are many plug-ins available...I think the solution that I went with was called fancybox, or fancy lightbox. It was very easy to implement and fully customizable. You could also look at Likno Web Modal Builder...3rd party program that lets you build modal popups from GUI. Very simple, but a little limited, and I think you have to pay to actually implement it into your site.