Back to Scripts page
Click in the text area below, select all and copy to grab the script
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Rotating Banners with Random Start</title> <script type="text/javascript" language="Javascript"> <!-- Hide script from old browsers adImages = new Array("images/banner1.gif","images/banner2.gif","images/banner3.gif") 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()", 3 * 1000) } } // End hiding script from old browsers --> </script> </head> <body bgcolor="#FFFFFF" onload="rotate()"> <center> <img src="images/spacer.gif" width="400" height="75" name="myPicture" alt="Ad Banner" /> </center> </body> </html>
Images:
(Some scripts do not have associated images)