function scroller_init(containerID){
	var myul=$(containerID).getElementsByTagName('ul')[0];
	var lik=myul.getElementsByTagName('li');
	var newli=new Array();
	var maxitemz=lik.length;
	var duration=maxitemz*5;
	var contW=$(containerID).offsetWidth;
	var iw=lik[0].offsetWidth;
	var im=parseInt(getStyle(lik[0],"margin-right"));
	var itemWidth=(iw+im);
	var stripwidth=maxitemz*itemWidth;
	var startPos=42;	//what else??? :)
	
	var d=0;
	if (maxitemz>=10){
		d=5;
	}else{
		if(maxitemz>5){
		d=maxitemz-5;
		}
	}

	if(stripwidth>contW){
		for(i=0;i<maxitemz;i++){
			newli[i]=document.createElement('li');
			newli[i].innerHTML=lik[i].innerHTML;
			myul.appendChild(newli[i]);
		}
		myul.style.left=startPos+"px";
		var inMotion=false;
		
		$('nextlink').onclick=function(){
			if(!inMotion){
				var xpos=parseInt(myul.style.left);
				if((0-xpos)>=(stripwidth)){
					xpos+=stripwidth;
				}
				t1 = new Tween(myul.style,'left',Tween.regularEaseInOut,xpos,xpos-(d*itemWidth),d*0.2,'px');
				t1.onMotionFinished = function(){inMotion=false;}
				t1.start();
				inMotion=true;
			}
		}
		
		$('prevlink').onclick=function(){
			if(!inMotion){
				var xpos=parseInt(myul.style.left);
				if((xpos+(d*itemWidth))>0){
					xpos-=stripwidth;
				}
				t1 = new Tween(myul.style,'left',Tween.regularEaseInOut,xpos,xpos+(d*itemWidth),d*0.2,'px');
				t1.onMotionFinished = function(){inMotion=false;}
				t1.start();
				inMotion=true;
			}
		}
	}else{
		myul.style.left=((contW-stripwidth)/2)+"px";
		$('nextlink').style.display='none';
		$('prevlink').style.display='none';
	}
}

function getStyle(oElm, strCssRule){
	var strValue = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
	}
	else if(oElm.currentStyle){
		strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
			return p1.toUpperCase();
		});
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}


