var nspeed; vspeed = 20; vbreak = 3; // sec. vStep = 95; // Pixel bis Pause; nc = 0; //element index top; /* do not edit */ nf = 0; nb = 0; // counter non edit; na = 0; // counter non edit; /* do not edit */ function initNews(){ nspeed = vspeed; if (nb < 10){ nb = nb+1; } tid3 = setTimeout("initNews()",1); if (nb==10){ clearTimeout(tid3); nb=0; if (NS4){ scrollElm = document.nsscrollnews.document.nsnews; scrollElm.top = 0; } if (IE5 || NS6){ scrollElm = document.getElementById("news"); container = document.getElementById("scrollnews"); nf = container.offsetHeight - 5; scrollElm.style.top = nf + 'px'; scrollElm.style.visibility = 'visible'; container.style.top = '0px'; } scrollnews(); } } function scrollnews(){ if (NS4) { scrollElm = document.nsscrollnews.document.nsnews; scrollElm_height = scrollElm.clip.height na=na+1; nc=nc-1; scrollElm.top = nc + nf; } if (NS6 || IE5){ scrollElm = document.getElementById("news"); scrollElm_top = scrollElm.offsetTop; scrollElm_height = scrollElm.offsetHeight; if (NS6){ scrollElm_height = scrollElm_height; } na = na+2; nc = nc-2; scrollElm.style.top = nc + nf + 'px'; } if(na > vStep - 20){ nspeed = nspeed + 2; } tid= setTimeout("scrollnews()",nspeed); if (IE5 || NS6){ if (-nc > nf + scrollElm_height){ clearTimeout(tid); na=0; nc=0; initNews(); } } if (NS4){ if (nc==-scrollElm_height-vStep){ clearTimeout(tid); na=0; nc=0; initNews(); } } if (na >= vStep){ clearTimeout(tid); na=0; stopp(); } } ni = 0; function stopp() { if(ni<10){ ni=ni+1; } tid2=setTimeout("stopp()",vbreak * 100); if(ni==10){ nspeed = vspeed; clearTimeout(tid2); ni=0; scrollnews(); } }