function letItRoll(holderId,shortlistClassname,elm,s,way){
this.id = letItRoll.Instances.length;
letItRoll.Instances[this.id] = this;
this.c;
this.rollerHolder;
this.rollerHolderCon;
this.dists;
this.itWid;
this.scrWid;
this.choser;
this.elm = elm;
this.ds;
this.lists;
this.roller;
this.a;
this.holderId = holderId;
this.shortlistClassname = shortlistClassname;
this.s = s;
this.way = way;
this.mutliply = multiplicator;
this.anim = animate;
this.mutliply();
this.start2 = start2;
}

letItRoll.Instances = new Array();
rollie = new Array();

function multiplicator(){
this.c = 0;
this.rollerHolder = document.getElementById(this.holderId);
this.rollerHolderCon = this.rollerHolder.innerHTML;
this.dists = this.rollerHolder.getElementsByTagName(this.elm);
if(this.way == "vertical"){
this.itWid = this.dists[0].offsetHeight;
this.scrWid = this.rollerHolder.offsetHeight;
}
else{
this.itWid = this.dists[0].offsetWidth;
this.scrWid = this.rollerHolder.offsetWidth;
}
this.choser = this.scrWid/this.itWid;
if(this.choser > 2 && this.choser < 100){
this.choser = Math.ceil(this.choser);
}
else{
this.choser = 2;
}
for(i=0;i<this.choser;i++){
this.rollerHolder.innerHTML = this.rollerHolder.innerHTML + this.rollerHolderCon;
}
this.ds = this.s;
this.lists = this.rollerHolder.getElementsByTagName(this.elm);
this.roller = new Array();
this.a = new Array();
for(i=0;i<this.lists.length;i++){
if(this.lists[i].className == this.shortlistClassname){
this.lists[i].id = this.shortlistClassname + this.c;
this.roller[this.c] = document.getElementById(this.shortlistClassname + this.c);
this.a[this.c] = 0;
this.c++;
}
}
this.anim();
}

function animate(){
this.c = new Array();
for(this.k=0;this.k<this.roller.length;this.k++){
this.c[this.k] = this.k*this.itWid;
if(this.way == "vertical"){
this.roller[this.k].style.top = this.c[this.k] + this.a[this.k] + 'px';
}
else{
this.roller[this.k].style.left = this.c[this.k] + this.a[this.k] + 'px';
}
if(this.c[this.k] + this.a[this.k] < -this.itWid){
this.a[this.k] = eval(this.choser*this.itWid) - this.c[this.k];
}
this.a[this.k] = this.a[this.k] - this.ds;
}
}

function loader(who){
obj = window;
evt = 'load';
if (obj.attachEvent){
obj.attachEvent('on'+evt,who);
}
else if (obj.addEventListener){
obj.addEventListener(evt,who,false);
}
}

function start2 () {
window.setInterval ('letItRoll.Instances['+this.id+'].anim()', 60);
}
function doIt(holderId,shortlistClassname,elm,s,way){
rollie[holderId] = new letItRoll(holderId,shortlistClassname,elm,s,way);
rollie[holderId].rollerHolder.onmouseover = function(){
rollie[holderId].ds=0;
}
rollie[holderId].rollerHolder.onmouseout = function(){
rollie[holderId].ds=rollie[holderId].s;
}
rollie[holderId].start2();
}
function rollIt(holderId,shortlistClassname,elm,s,way){
var looper = function(){doIt(holderId,shortlistClassname,elm,s,way);}
loader(looper);
}

