//***************************************************
//* http://members.rogers.com/bazil/scrollglide.htm *
//***************************************************
//-- Begin Scroller's Parameters -->

//scroller width: change to your own;
var swidth=225

//scroller height: change to your own;
var sheight=130

//background color: change to your own; 
var sbcolor="#CCE8A1"

//scroller's speed: change to your own;
var sspeed=2


// I MESSAGGI VARIABILI DA INSERIRE NELLO SCROLLER
// sono contenuti nella variabile aMessaggio[j]
// e sono inizializzati nello script esterno "MessaggiPerScroller.js".


//preload one Image:
srcpng1 = new Image();
srcpng1.src = "/img/pixel.gif";

var wholemessage='';

/*
wholemessage='<div align="center" class=tabc>Message Scroller: NS4+ NS6+ IE4+</DIV>'+
'<div align="center" class=tab><br>1.CLICK on HyperLink Image:</div>'+
'<div align="center" class=tab><a class=tabb href="#" onClick=\'window.top.location.href="http://www.como.caritas.it"\'><img width="150" height="56" src=' +srcpng1.src+ '></a></div>'+
'<div align="center" class=tab><BR></div>'+
'<div align="center" class=tab><br>2.Check out this terrific BUNDLE:</div>'+
'<div align="center" class=tabb><a class=tabb href="#" onClick=\'window.top.location.href="http://www.como.caritas.it"\'><u>Scroller + Conveyer + Glide</u></a></DIV>'+
'<div align="center" class=tab>and so on...</div>'
*/

var s = '';
for(var j=0; j<aMessaggio.length; j++) {
	s = '';
	s += '<B>' + aData[j] + '</B>';
	s += '<div class=ScrollerTitle>' + aTitolo[j] + '</div>';
	s += aMessaggio[j];
	s += '<div class="ScrollerLink"><a href="' + aLinkUrl[j] + '">' + aLink[j] + '&nbsp;&nbsp;<b>&raquo;</b></a></div>';
	s += '<div class="ScrollerSep"></div>'
	wholemessage += s;
}

//-- end Parameters-->
//-- begin: Scroller's Algorithm -->

var resumesspeed=sspeed
function startScroller(){
if (document.all) iemarquee(slider);
else if (document.getElementById)
ns6marquee(document.getElementById('slider'));
else if(document.layers)
ns4marquee(document.slider1.document.slider2);
}
function iemarquee(whichdiv){
iediv=eval(whichdiv)
iediv.innerHTML=wholemessage 
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 ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
ns4layer.document.write(wholemessage)
ns4layer.document.close()
sizeup=ns4layer.document.height
ns4layer.top-=sizeup
ns4slide()
}
function ns4slide(){
if (ns4layer.top>=sizeup*(-1)){
ns4layer.top-=sspeed
setTimeout("ns4slide()",100)
}
else{
ns4layer.top=sheight
ns4slide()
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
ns6div.innerHTML=wholemessage
ns6div.style.top=sheight
sizeup=ns6div.offsetHeight
ns6slide()
}
function ns6slide(){
if (parseInt(ns6div.style.top)>=sizeup*(-1)){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6slide()",100)
}
else{
ns6div.style.top=sheight
ns6slide()
}
}
//-- end Algorithm -->

