Nice Hack!
For my purpose, I made a small, but effective change:
Code:
var vbimgcodeWidthMax = screen.width-420;
var vbimgcodeWidthSizeTo = screen.height-300;
(Depending on the individual forum layout, you should sample different values instead of 420 and 300.)
Now the max image-size depends on the screen-resolution of the visitor. Do the visitor have a high screen-resolution, he will see a greater pic than a visitor, that have a lower screen-resolution. In any case, the screen resolution will be used to its full capacity, without the problem, that the forum-layout gets destroyed, because of oversized pics.
Greetings,
Chriss