<html> <head> <script type="text/javascript"> var imgs = new Array( 'csny.jpg', 'heneken2.png', 'Google.png', 'siemens c65.png', 'weed2.png' ); var pos = 0; function chImg() { var i = document.getElementById( 'imgField' ); i.src = './img/' + imgs[ pos++ ]; if( pos >= 5 ) { pos = 0; } window.setTimeout( 'chImg()', 5000 ); } </script> </head> <body onload="chImg();"> <img src="./img/Google.png" id="imgField"/> </body> </html>