﻿function MarqueeLinkBox(id, lh, speed, delay) 
{
       var o = document.getElementById(id);
       var p = false;
       var t;
       o.style.overflow = "hidden";
       o.style.height = o.style.lineHeight = lh + "px";
       o.style.lineHeight = "22px";
       o.style.height = o.style.lineHeight;
       o.onmouseover = function() { p = true; }
       o.onmouseout = function()  { p = false;}
       function start() {
              t = setInterval(scrolling, speed);
              if (!p) {o.scrollTop++;}
       }
       function scrolling() {
              if ((o.scrollTop % lh) != 0) {
                     o.scrollTop++;
                     if (o.scrollTop >= o.scrollHeight - lh - 1) 
                     {
                       o.scrollTop = 0;
                     }
              } else {
                     clearInterval(t);
                     setTimeout(start, delay);
              }
       }
       setTimeout(start, delay);
}
