Forum Moderators: open
The "quick n' dirty" way of doing it with just having <img src='image.gif'> instead of text in the javascript part only really deals with part of the problem. Dreamweaver is also adding some borders and other fancy stuff that works well with text, but with images, it's a little iffy.
I could look into it a little more, and i'm sure everyone else here with dreamweaver could as well, but honestly alot of the stuff that dreamweaver uses even other than this popup thing is just really specific and could honestly be done alot clearer for upgrading and maintenance sake (just look at all the 'nav bar' crap). Of course if you never changed or looked at the code, everything is pretty much acceptable, but as soon as you start doing any sort of code hacking, dreamweaver can start having fits and it'll just lead to other crap.
Short answer: Not a good idea for images if you're gonna just edit the code anyway, find something else.