/***********************************************
* vertical scroller script v1.0 by stefan mielke
***********************************************/

//scroller height
//var sheight=120;
//scroller's speed
var sspeed=1;
// delay bis zum start
var delay=2000; // (2000=2 seconds)
var resumesspeed=sspeed

function startscroll() {
	// überpüfen ob der ticker existiert
	if (document.getElementById('ticker')) {
		setTimeout('initializemarquee()',delay)
		sheight=document.getElementById("ticker-container").offsetHeight
	//alert(sheight) //debug
	};
}
function initializemarquee() {
        if (document.all) iemarquee(ticker);
        else if (document.getElementById)
                ns6marquee(document.getElementById('ticker'));

}

function iemarquee(whichdiv){
        iediv=eval(whichdiv)
        sheight += -sheight;
        iediv.style.pixelTop=sheight
         
        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 += -sheight;
        ns6div.style.top=sheight + "px";
        
        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()
        }
}

if (window.addEventListener)
window.addEventListener("load", startscroll, false)
else if (window.attachEvent)
window.attachEvent("onload", startscroll)
else if (document.getElementById)
window.onload=startscroll

