if(document.getElementById("marq")) pL=document.getElementById("marq").offsetWidth else pL=1000 i=10 il=0 L=pL function wissel(){ document.getElementById('i'+il).style.zIndex=i document.getElementById('i'+il).style.left=L+"px" if(L>(pL/3)){ L-=20 tijd=setTimeout("wissel()",20) } else{ i++ il=i%10 tijd=setTimeout("wissel()",5000) L=pL } } window.onload=function(){ wissel() // heet van de naald }