OK, forget my last post, I guess I was writing it at the same time you were posting your second reply.
But I thought that by putting the code in the vbcode.js file, that I wouldn't have to put it in the header. That's how the smilies popup window works. I basically copied the whole smilies popup and just changed which template it used (and of course the function names).
The whole thing works. A window pops up. The problem is that I can't get the forumid number to get into the template that's being used. I can't get it from the link into the template. If I hardcode the forumid number, it works fine, but if I use the variable, it doesn't work. I get an error message that no forumid was specified. There must be something wrong with the syntax of the code that PPN gave in his last message; it's not properly getting the forumid number from the link.