var swidth=150; var sheight=125; var sspeed=1; var rspeed=sspeed; var spause=4000; var newstext=new Array(); var ii=0; var iediv; function start(){ newdiv=document.getElementById('newsdiv'); newdiv.style.top=sheight + 'px'; newdiv.innerHTML=newstext[0]; sizeup=newdiv.offsetHeight; newscroll(); } function newscroll() { if (parseInt(newdiv.style.top)>0&&parseInt(newdiv.style.top)<=sspeed) { newdiv.style.top = '0px'; setTimeout("newscroll()",spause); } else if (parseInt(newdiv.style.top)>=sizeup*-1) { newdiv.style.top = parseInt(newdiv.style.top)-sspeed + 'px'; setTimeout("newscroll()",10); } else { if( ii==newstext.length-1) { ii=0; } else { ii++; } newdiv.style.top = sheight + 'px';; newdiv.innerHTML = newstext[ii]; sizeup = newdiv.offsetHeight; newscroll(); } }