I have tried to do this in the past and have never had luck. There are lots of lightbox scripts out there on the web. They all do a wonderful job of opening an image when a link is clicked. I've never been able to make one do it onload.
I don't have any code to share at the moment. I'm just throwing this out there to see if anyone has a lightbox-style thing that will display an image onload. It would be an awesome help.