Create a rotator.js file with following content:
HTML Code:
banners=new Array()
banners[1]='http://www.URL-1A,www.URL-1B'
banners[2]='http://www.URL-2A,www.URL-2B'
banners[3]='http://www.URL-2A,www.URL-2B'
for(i=0;i<1;i++){
ppo=Math.round((banners.length-1)*Math.random())
if(typeof Array().splice=='function'){
current_banner=banners.splice(ppo,1)
} else{current_banner=banners[ppo]}
current_banner=current_banner.toString()
current_banner=current_banner.split(',')
document.writeln('<a href="http://'+current_banner[1]+'"><img src="'+current_banner[0]+'" alt="" width="125" height="125" border="0"></a>')
}
Where in banners [1] the first link(http: //www.URL-1A) refers to the image and the second(www. URL-1B) is link.
width="125" height="125" - These are the dimensions of the banner
Use this line to include a banner rotator in the index file:
HTML Code:
<script type="text/javascript" src="rotator.js"></script>