Javascript to rotate images in a website