I did make this one that was less wasteful but I just could not get it to work for the life of me, it preloaded the images and change the scr attribute. The document.write is what I have been taught and I am still learning, what is a good alternative to use instead of that? Once again, thanks for the help This is the one that I could not get to work
<script type="textjavascript"><!---//store an interval in a variablevar pause = 1500;//create and intialize a countervar n = 0;//create an array of image file namesvar imgs = new Array("Img1.jpg","Img2.jpg","Img3.jpg");//preload all the imagesvar preload = new Array();for( var i = 1; i<imgs.length;i++){peeload[i] = new Image();preload[i].src = imgs[i];}//a function to display each image for the set intervalfunction rotate(){document.images.pic.src = imgs[n];(n == (imgs.length - 1)) ? n = 0 : n++;setTimeout("rotate()", pause);}//specify the onload event-handlerwindow.onload=rotate;--></script>