
var marqueespeed=1; //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1; //Pause marquee onMousever (0=no. 1=yes)?

cont = new Array("pic0", "pic1", "pic2", "pic3", "pic4", "pic5", "pic6", "pic7", "pic8", "pic9");
//cont.sort( randOrd );

var copyspeed=marqueespeed;
var pausespeed=(pauseit==0)?copyspeed:0;

function randOrd(){
return (Math.round(Math.random())-0.5); }


function initScoll() {
    zItem = 500;   
    for (i = 0; i < cont.length; i++) {
        zItem -= 1
        initItem = document.getElementById(cont[i]);
        actualheight= initItem.offsetHeight;
        initItem.style.position= "absolute";
        initItem.style.top=actualheight*i+"px";
        initItem.style.zIndex=zItem;
    }

    setInterval("liScroll()",40);
}

function liScroll(){
for (i = 0; i < cont.length; i++) {
    listitem = document.getElementById(cont[i]);
    if (parseInt(listitem.style.top)>(actualheight*(-1)))
        listitem.style.top=parseInt(listitem.style.top)-copyspeed+"px";
    else
        listitem.style.top=parseInt((cont.length)-1)*actualheight-1+"px";
        }
}

if (window.addEventListener) {
    window.addEventListener("load", initScoll, false);
} else if (window.attachEvent) {
    window.attachEvent("onload", initScoll);
} else if (document.getElementById) {
    window.onload=initScoll;
}


