|
Post by Eric on Jan 22, 2006 20:43:01 GMT
<script type="text/javascript"> <!-- var affiliates=new Array(); //Affiliates Here affiliates[0]=new Array('','');
//Vars able to be edited //As of now negative vars are not supported var amount=92*affiliates.length; //Recommended to leave this alone var px=-amount;//Recommended to leave this alone var width=400; //Width of affiliate bar var x=1; //Pixels to move //Increasing makes it faster var time=0; //Time to wait //Increasing makes it slower
//Do not edit below unless experienced function moveit(){ var test=document.getElementById('test'); test.style.left=+px+'px'; if(px==width+5){ px=-amount; } px+=x; setTimeout("moveit()",time); } document.write('<table align="center" class="bordercolor" border="0" cellspacing="1" cellpadding="3">'); document.write('<tr><td class="titlebg" height="20"><font size="2"><b>Affiliates</b></font></td></tr><tr>'); document.write('<td class="windowbg" style="height:40px;">'); document.write('<div id="holder" style="position:relative;width:'+width+'px;height:60px;overflow:hidden;">'); document.write('<div id="test" style="position:relative;">'); for(i=0;i<affiliates.length;i++){ document.write('<a href="'+affiliates[1]+'" target="blank"><img src="'+affiliates[0]+'" border="0" /></a> '); } document.write('</div></div>'); document.write('</td></tr></table>'); moveit(); //--> </script>
I made this a while ago. It can go here though. Its ok for learning some DHTML.
|
|