//function to load in news text
 function loadNewsText(){
	var newsRec = null;

	if (window.XMLHttpRequest){
		//Everything but IE
		newsRec = new XMLHttpRequest();
	}
	else if(window.ActiveXObject){
		//IE
		newsRec = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if (newsRec != null){
		var url;
		url="/tickers/news.txt?t=" + Math.round(Math.random()*10000000);
		
		newsRec.open("GET",url,false);
		newsRec.send(null);
		
		if (newsRec.status==200){
			return newsRec.responseText;
		}
		
		return ''
	}
}

//function to add onload to body of news ticker pages
function addNewsEventHandler()
{    
    var previous_handler = window.onload;
    if(typeof window.onload != "function") window.onload = start; 
    else window.onload = function()
    {            
        previous_handler ();             
        start();        
    }
}
 
 //scroller width
        var swidth=100;

        //scroller height
        var sheight=0;

        //background color
        var sbcolor='';

        //scroller's speed
        var sspeed=3;

        var msg=''

        //Your messages go below:

        msg = loadNewsText();

        //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()
                }
        }
