Random Image

Is there a way to get a random image to load onto the screen using an xml file or something similar. The only tut i found was php based. I’m just looking for something simple to load one of say 3 images randomly for my homepage. Thanks for any help in advance.