Random Transitions

the link below is what im trying to do:
http://www.flash-applets.com/random_image_slideshow.html

how would i do this?