Random image, just not the same image a second time

Does anyone know how to have a random image that does not repeat.

For example if a particular image has loaded once, I dont want this image loading again just because its part of the random feature.

Any samples of this in place would be very helpful.

Thanks