I dont know how to fade in through this.. I just need to simple fade in the next coming image.
<script language="JavaScript"> var john=['0.jpg','1.jpg','2.jpg'];for (var img,pic=0;pic<john.length;pic++){img=john[pic];john[pic]=new Image();john[pic].src=img;}var bac=0,to=null;function ImageRotate(){bac=++bac%john.length;document.getElementById('name').style.backgroundImage='url('+john[bac].src+')';to=setTimeout(function(){ ImageRotate(); },2000);}</script></head><body id="name" onLoad="ImageRotate();"></body></html>