Twitter Feed Popout byInfofru

Dynamically control the scroll amount of marquee

Having a marquee on a page is not a big deal but what if somebody wants user to adjust the speed of the moving text. So the idea is we have many marquee in one page and we want to adjust their speed using two javascript Buttons called "Speed Up" and "Speed Down"The logic is very simple, the marquee tags which you want to control with the help of buttons give them name in my case it is "Scrollers" (Remember it is name not id, so you can give same name to as many controls).Now call the following function on "Speed Up" and "Speed Down" button respectively.
   1: function speedUp()
   2: {
   3:     var obj = document.getElementByName("scrollers")
   4:
   5:     for (i=0;i<=obj.Length -1;i++)
   6:     {
   7:         obj[i].scrollAmount = obj[i].scrollAmount * 3 - obj[i].scrollAmount
   8:     }
   9: }
  10:
  11: function speedDown()
  12: {
  13:     var obj = document.getElementByName("scrollers")
  14:
  15:     for (i=0;i<=obj.Length -1;i++)
  16:     {
  17:         obj[i].scrollAmount = obj[i].scrollAmount * (10/7) - obj[i].scrollAmount
  18:     }
  19: }
That's it