Google for 'Shadowbox' or 'Lightbox' or 'Fancybox' - either of these will do the job for you. They're also open-source and free to use and highly customizable with CSS.
Although... Since I don't know much about Ajax I didn't understand why certain functions would work only on a server (verses local). I've been doing everything local but will try to put the code up on the server and try it with ajax functionality enabled.
You're welcome. Glad I could help.