var adImages = new Array("images/cups.jpg", "images/plates.jpg", "images/wine.jpg", "images/cutlery.jpg", "images/glass2.jpg", "images/chairs.jpg")

	imgCt =adImages.length
	firstTime =true

function rotate() {
	if (document.images) {
		if(firstTime) {
			thisAd =Math.floor((Math.random() * imgCt))
			firstTime =false
}
	else {
	thisAd++
		if (thisAd ==imgCt) {
		thisAd =0
 }
}
document.myPicture.src=adImages[thisAd]
	setTimeout("rotate()", 4000)
 }
}
window.onload=function() {
	rotate();	
}