Image gallery

hey all,

I am looking at the image gallery toturial on kirupa:
I would like the gallery to randomly load an image and also, not use the buttons. I have been trying to get the images to just cycle through onload but it does not seem to be working… what script is need so that the buttons are not need…

function control() {
delay = setInterval(control, 1000);

is it something like this… cause it is not working… please help… thanks