var id,pause=0,position=0; var ww = 0,p,wa = 0,c=0; var sp = []; var mw =0; var reset=0; var px = 1; var running = 1; function getId(n){return document.getElementById(n);} function rsstop() {running = 0;} function rsstart() {running = 1;} function ticker() { if(running) { getId('zzz').style.margin="0 0 0 "+ww+"px"; ww -= px; if(ww <= reset) { ww = -px*2; clearTimeout(id); } } id=setTimeout("ticker()",60); } function init() { while(1) { for(i=0;i "+sp[i][1]+"  :  "; getId('zzz').appendChild(p); if(c && !i && !reset && wa>getId("qqq").offsetWidth) { wr = wa/px; wr = wr.toFixed(); reset = wr*px; reset -= reset*2; } wa += getId(p.id).offsetWidth; if(!c) continue; if(c == 1 && !i) { mw = wa*3.5; } if(wa>mw) break; } if(c&&(wa>mw||c>10)) break; ++c; } running = 1; } init(); //ticker();