function init() { if(NS4) { scrollElm = document.nsscrollnews.document.nsnews; scrollElm.top = 0; } if(IE5 || NS6) { scrollElm = document.getElementById("news"); container = document.getElementById("scrollnews"); scrollElm.style.top = f; container.style.top = 0; } scrollnews(); } function scrollnews() { if(NS4) { scrollElm = document.nsscrollnews.document.nsnews; scrollElm_height = scrollElm.clip.height a=a+1; c=c-1; scrollElm.top =c+f; } if(NS6 || IE5){ scrollElm = document.getElementById("news"); scrollElm_top = scrollElm.offsetTop; scrollElm_height = scrollElm.offsetHeight - 10; if(NS6){ scrollElm_height = scrollElm_height; } a=a+1; c=c-1; scrollElm.style.top = c + f + "px"; } tid= setTimeout("scrollnews()",50); if(IE5 || NS6){ if(-c > f + scrollElm_height){ clearTimeout(tid);a=0;c=-20;init(); } } if(NS4){ if(c==-scrollElm_height){ clearTimeout(tid);a=0;c=0;init(); } } if(a==step){ clearTimeout(tid);a=0;stopp(); } } i=0; function stopp() { if(i<10) { i=i+1; } tid2=setTimeout("stopp()",180); if(i==10) {clearTimeout(tid2);i=0;scrollnews()} }