Prova a vedere questo. Non sono sicuro, pero`, dato che non ho la possibilita` di valutare tutta la pagina.
codice:
if (document.all)
document.write('<center><marquee onmouseover="okscroll=false;" onmouseout="okscroll=true;" scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee></center>')

....

var okscroll = true;
function scrollit(){
  if(!okscroll) setTimeout("scrollit()",100);
  if (document.cmarquee01.document.cmarquee02.left >= thelength*(-1)){
    document.cmarquee01.document.cmarquee02.left -= speed;
    setTimeout("scrollit()",100);
  }else{
    document.cmarquee01.document.cmarquee02.left = marqueewidth;
    scrollit()
  }
}

NOTA: manca il codice per browser diversi da IE (e questo non e` bello!!!)