﻿        var height = 0;
        var speed = 3;
        var resumespeed = speed;
        var sstart = true;
        var sdir = 'up';
        var msg = '';
        var tid = 0;
        var nstop = 0;

        function Scroll(dir) {
            sdir = dir;

            if (document.all)
                IESet(ticker);
            else if (document.getElementById)
                NSSet(document.getElementById('ticker'));

            speed = resumespeed;
        }
        
        function IESet(whichdiv) {
            iediv = eval(whichdiv);
            msg = iediv.innerHTML;
            height = iediv.offsetHeight;
            
            if (sdir == 'up') 
                IEScrollUp();
            else 
                IEScrollDown();
        }

        function IEScrollUp() {

            if (iediv.style.pixelTop >= height * (-1)) {
                iediv.style.pixelTop -= speed;
                tid = setTimeout("IEScrollUp()", 10);
            }
        }

        function IEScrollDown() {
                    
            if (iediv.style.pixelTop <= 0) {
                iediv.style.pixelTop += speed;
                tid = setTimeout("IEScrollDown()", 10);
            }
        }

        function NSSet(whichdiv) {
            ns6div = eval(whichdiv);
            msg = ns6div.innerHTML;
            height = ns6div.offsetHeight;
           
            if (sdir == 'up') {
                ns6div.style.top = nstop + "px";
                NSScrollUp();
            }
            else
                NSScrollDown();
        }

        function NSScrollUp() {
            if (parseInt(ns6div.style.top) >= height * (-1)) {
                theTop = parseInt(ns6div.style.top) - speed;
                ns6div.style.top = theTop + "px";
                nstop = theTop;
                tid = setTimeout("NSScrollUp()", 10)
            }
        }

        function NSScrollDown() {
            if (parseInt(ns6div.style.top) <= 0) {
                theTop = parseInt(ns6div.style.top) + speed;
                ns6div.style.top = theTop + "px";
                nstop = theTop;
                tid = setTimeout("NSScrollDown()", 10)
            }
        }

        function Stop() {
            speed = 0;
            clearTimeout(tid);    
        }

        
