I posted up some code many pages back which may be of use. Also I had some random javascript that rotated images (I used it on SSC, or at least it's first incarnation) so I definitely have the code kicking about somewhere - it's easy really, you just define the images as an array and randomly select one. Easy.
Can also be used for any image type, as long as the browser supports it.
Anyway, since it's going to be template specific no vBulletin mod is needed - all you need is the template's code for the header and insert the javascript where the image would normally go.