var marquee;
var pos=0;
var mwidth=1000;
var scrollingnow=true;

function init(){
    
    // We'll try to get handle with DOM, document.all and not yet document.layers
    
    marquee= (document.getElementById) ? document.getElementById('eventscroll') : (document.all) ? document.all['eventscroll'] : (document.layers) ? document.layers['eventscroll'] : null;
	if(marquee){
	    marquee.style.position="fixed";
	    marquee.style.bottom="0px";
	    marquee.style.left="0px";
	    marquee.style.right="0px";
	    //marquee.style.zindex="2";
	    marquee.style.overflow="hidden";
	    marquee.style.height="1.5em";
	    marquee.style.border="1px solid #ff3498";
	    marquee.style.color="#ff3498";
	    if(document.all && !window.opera){
		// This is IE, change styles again..
		marquee.style.position="absolute";
		
	    }
	   /* if(marquee.offsetWidth){
		mwidth=marquee.offsetWidth;
	    }else */ if(marquee.innerHTML){
		mwidth=marquee.innerHTML.length*5; // 10 px width for each character OK?
	    }
	    
	    var to=setTimeout('opMarqScroll()', 500)
	    
	}

}


function opMarqScroll(){
    
    if(scrollingnow && marquee.style){
	marquee.style.left=-pos;
	//marquee.style.clip="rect(0 -"+left+" 0 "+left+" )";
//	alert(marquee.style.left);
	pos=(pos>mwidth) ? 0 : pos+5;
    }
    to=setTimeout('opMarqScroll()', 500)
}


document.onload=init;

function analyse(){
    for(v in marquee.style){
	alert(v + eval('marquee.style.'+v));
    }
}