Buongiorno,

Sto cercando di fare un algoritmo che scorra due immagini in base a un setInterval.
Praticamente voglio che le due immagini dopo due secondi vengano invertite, mettendo l'immagine piccola in quella grande e viceversa.

HTML:
codice:
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="stile.css">
		<title>immagini svoltate</title>
		<script>
			var immagine=new Array("snoopy1.jpg","snoopy2.jpg");

			function scorri () {
				setTimeout ("img1()",2000);
				setTimeout ("img2()",2000);
			}
			function img1 () {
				document.images[0].src=immagine[0];
				document.images[1].src=immagine[1];
			}
			function img2 () {
				document.images[0].src=immagine[1];
				document.images[1].src=immagine[0];
			}
		</script>
	</head>
		<body>
			<p id="sx">
				[img]snoopy.jpg[/img]
			</p>
			<p id="dx">
				[img]snoopy.jpg[/img]
			</p>
			<script>
					var tmp=setInterval ("scorri()",3000);
			</script>
		</body>
	</html>
CSS:
codice:
#sx {
		margin-top=200px;
		margin-left=15px;
		border-style=outset;
		border-width=3px;
		height=150;
		width=150;
		opacity:0.6;
		filter:alpha(opacity=40);
		
		float=left;
}
#dx {
		margin-top=30px;
		margin-left=200px;
		border-style=inset;
		border-width=3px;
		height=600;
		width=600;
		opacity:1;
		filter:alpha(opacity=100);
}
#img1 {
		height=150;
		width=150;
}
#img2 {
    height=600;
		width=600;
}