function divInit() { if(var_b<10){ var_b = var_b+1; } tid3 = setTimeout("divInit()",1); if(var_b == 10){ clearTimeout(tid3); var_b=0; if(NS4){ elm = document.nsscrollnews.document.nsnews; elm.top = 0; } if(IE5 || NS6){ elm = document.getElementById("news"); outerBox = document.getElementById("scrollnews"); outer_height = outerBox.offsetHeight; var_f = outer_height + 25; elm.style.top = outer_height-5; outerBox.style.top = 0; } scrollnews(); } } function scrollnews() { if(NS4) { elm = document.nsscrollnews.document.nsnews; elm_height = elm.clip.height if(var_a < elm_height){ var_a= var_a+1; var_c = var_c-1; } elm.top = var_c + var_f; } if(NS6 || IE5) { elm = document.getElementById("news"); outerelm = document.getElementById("scrollnews"); elm_top = elm.offsetTop; elm_height = elm.offsetHeight; outer_top = outerelm.offsetTop; outer_height = outerelm.offsetHeight; if(elm_top > outer_top - (elm_height + var_f)){ elm.style.top = elm_top - 1; var_a++; } } tid1 = setTimeout("scrollnews()",30); elm_top = elm.offsetTop; if(IE5 || NS6){ if(elm_top == outer_top - (elm_height + var_f)){ clearTimeout(tid1); var_a = 0; var_b = 0; divInit(); } } if(NS4){ if(var_c ==-elm_height){ clearTimeout(tid1); var_a = 0; var_c=0; divInit(); } } if(var_a % step ==1){ clearTimeout(tid1); var_i=0; stopp(); } } var_i=0; function stopp() { if(var_i<10){ var_i = var_i+1; } tid2=setTimeout("stopp()",180); if(var_i==10){ clearTimeout(tid2); var_i=0; scrollnews(); } }