<!-- Home Page News Ticker -->

//scroller width & height
var swidth=526;
var sheight=40;

//background color
var sbcolor='#ffffff';

//scroller's speed
var sspeed=1;

//Your messages go below:
var msg=''

msg +=

'<ul><li>New treatment program for young adults (18 - 25 yrs old) launched in Mansfield. <a href="http://natchaug.org/programs.htm#yap" title="">click for more info</a></li>'+
'<li> </li></ul>'+                     
            
'<ul><li>The Quinebaug Adult Day Treatment has moved to Dayville. <a href="http://natchaug.org/programs.htm#dt" title="">click for more info</a></li>'+
'<li> </li></ul>'+  
            
'<ul><li>Seminar 4/12: "Psychiatric, Psychological, and Neuropsychological Evaluations for Schools". <a href="http://natchaug.org/events.asp#seminars" title="">click for more info</a></li>'+
'<li> </li></ul>'+  
            
'';

//End of your messages
// Begin the ticker code

var resumesspeed=sspeed
function start() {
    if (document.all) iemarquee(ticker);
        else if (document.getElementById)
        ns6marquee(document.getElementById('ticker'));
    }
        
function iemarquee(whichdiv){
    iediv=eval(whichdiv)
    sheight += 50;
    iediv.style.pixelTop=sheight
    iediv.innerHTML=msg 
    sizeup=iediv.offsetHeight
    ieslide()
}
        
function ieslide(){
    if (iediv.style.pixelTop>=sizeup*(-1)){
        iediv.style.pixelTop-=sspeed
            setTimeout("ieslide()",100)
        }
    else {
        iediv.style.pixelTop=sheight
        ieslide()
    }
}
        
function ns6marquee(whichdiv){
    ns6div=eval(whichdiv)
        sheight += 50;
        ns6div.style.top=sheight + "px";
        ns6div.innerHTML=msg
        sizeup=ns6div.offsetHeight
        ns6slide()
    }
    function ns6slide(){
        if (parseInt(ns6div.style.top)>=sizeup*(-1)){
            theTop = parseInt(ns6div.style.top)-sspeed
            ns6div.style.top = theTop + "px";
            setTimeout("ns6slide()",100)
        }
        else {
            ns6div.style.top = sheight + "px";
            ns6slide()
        }
}
