ti posto lo script modificato, è un pasticcio, ma ti darà la possibilità di comprendere le funzioni che, a quanto pare, si possono duplicare
<script>
window.onload = initBannerLink
var adImages = new Array("/public/style_images/subway/banner/banner1.gif","/public/style_images/subway/banner/banner2.gif","/public/style_images/subway/banner/banner3.gif","/public/style_images/subway/banner/banner4.gif","/public/style_images/subway/banner/banner5.gif");
var adURL = new Array("domain1.com","domain2.com","domain3.com","domain4.com","domain5.com");
var adImages2 = new Array("/public/style_images/subway/banner/banner6.gif","/public/style_images/subway/banner/banner7.gif","/public/style_images/subway/banner/banner8.gif","/public/style_images/subway/banner/banner9.gif","/public/style_images/subway/banner/banner10.gif");
var adURL2 = new Array("domain6.com","domain7.com","domain8.com","domain9.com","domain10.com");
var thisAd = 0;
var thisAd2 = 0;
function rotate() {
thisAd++;
if (thisAd == adImages.length) {
thisAd = 0;
}
document.getElementById("adBannerL").src = adImages[thisAd];
setTimeout("rotate()", 5 * 2000);
initBannerLink2();
}
function rotate2() {
thisAd2++;
if (thisAd2 == adImages2.length) {
thisAd2 = 0;
}
document.getElementById("adBannerR").src = adImages2[thisAd2];
setTimeout("rotate2()", 5 * 2000);
}
function newLocation() {
window.open("htpp://" + adURL[thisAd],'_blank');
return false;
}
function newLocation2() {
window.open("htpp://" + adURL2[thisAd2],'_blank');
return false;
}
function initBannerLink() {
if (document.getElementById("adBannerL").parentNode.tagName == "A") {
document.getElementById("adBannerL").parentNode.onclick = newLocation;
}
rotate();
}
function initBannerLink2() {
if (document.getElementById("adBannerR").parentNode.tagName == "A") {
document.getElementById("adBannerR").parentNode.onclick = newLocation2;
}
rotate2();
}
</script>
<a href=""><img id="adBannerL"/></a>
<a href=""><img id="adBannerR"/></a>