Hi, i am an artist/web designer new to javascripting...<br>I do cut n paste and some syntax tweaking to make interesting actions in my web pages...<br><br>My problem of the day is:<br>Multiple redundant copies of same randomizer script on same page; none works...<br>One copy only of the script in page and it works fine....<br><br>I tried to modify the array and function names to fool the other script but no chance...<br>May look simplistic but i stumbled on this one...<br><br>Here is the script:<br><br><script language="JavaScript"><br><!--<br>images = new Object;<br>function adArray() {<br> for (i=0; i*2<adArray.arguments.length; i++) {<br> if (document.images) {<br> images<i> = new Image();<br> images<i>.src = adArray.arguments[i*2];<br> }<br> this<i> = new Object();<br> this<i>.src = adArray.arguments[i*2];<br> this<i>.href = adArray.arguments[i*2+1];<br> }<br> this.length = i;<br>}<br>function getAdNum() {<br> dat = new Date();<br> dat = (dat.getTime()+"".charAt(8);<br> if (dat.length == 1)<br> ad_num = dat%ads.length;<br> else<br> ad_num = 0;<br> return ad_num;<br>}<br> <br><br>var num_ads_to_display = 5;<br><br>var ads = new adArray(<br>"images/red.gif","index.htm",<br>"images/green.gif","green.htm",<br>"images/yellow.gif","yellows.htm",<br>"images/violet.gif","violet.htm",<br>"images/blue.gif","blue.htm"<br><br>var ad_num = getAdNum(); <br><br>function writeAd(i) {<br> document.write('<A HREF="'+ads[(ad_num+i)%ads.length].href<br> +'"><IMG SRC="'+ads[(ad_num+i)%ads.length].src+'" '<br> +'width=50 height=50 border=0 name="js_ad'+i+'" vspace=0></A><br>');<br>}<br><br><br>for(i=0;i<num_ads_to_display;i++)<br> writeAd(i);<br>link_num = document.links.length-num_ads_to_display;<br><br>function rotateSponsor() {<br> if (document.images) {<br> ad_num = (ad_num-1+ads.length)%ads.length;<br> for (i=0; i<num_ads_to_display; i++) {<br> eval("document.js_ad"+i+".src = ads[(ad_num+i)%ads.length].src;"<br> document.links[link_num+i].href = ads[(ad_num+i)%ads.length].href;<br> }<br> setTimeout("rotateSponsor()",2000);<br> }<br>}<br>setTimeout("rotateSponsor()",2000);<br><br>// --><br></script> <br><br><br>Thanx in advance <br>Atomas