﻿function addScrollers() {
// code each scroller as follows:
// startScroll('id of scroller div','content of scroller');
startScroll('myscroller','<p>02/09/2010 <b><a href="http://www.comprensivoruffano.it/news/DeliberaConsiglioIstituto-OrarioSettimanale.pdf">Delibera del Consiglio di Istituto. Orario settimanale. </b></a></p><p>02/09/2010 <b><a href="http://www.comprensivoruffano.it/news/OrganizzazioneInizioAnnoScolastico10-11.pdf">Organizzazione inizio Anno Scolastico 2010-11 Rettifica</b></a></p><p>16/07/2010<b> FONDO EUROPEO PER LO SVILUPPO REGIONALE COD. PROGETTO B -1 A FESR - 2008-349 <br /><a href="http://www.comprensivoruffano.it/news/Bando_Gara_Completamento_Laboratorio_Scientifico.pdf">Bando gara completamento laboratorio scientifico </b></a></p><a href="http://www.comprensivoruffano.it/calendario_scolastico.html"><p>06/07/2010 <b>Calendario Scolastico 2010-11</b></p></a><a href="http://www.comprensivoruffano.it/news/BROCHURE_2010_2011.pdf"><p>23/07/2010 <b>Brochure Scuola dell Infanzia A.S. 2010-11</b></p></a>');}

var speed=5; // scroll speed (bigger = faster)
var dR=false; // reverse direction

// Vertical Scroller Javascript
// copyright 24th September 2005, by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code below (as well as these
// comments) is used without any alteration
var step = 2; function objWidth(obj) {if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} function objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} function scrF(i,sH,eH){var x=parseInt(i.top)+(dR? step: -step); if(dR && x>sH)x=-eH;else if(x<2-eH)x=sH;i.top = x+'px';} function startScroll(sN,txt){var scr=document.getElementById(sN); var sW = objWidth(scr)-6; var sH = objHeight(scr); scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; width:'+sW+';">'+txt+'<\/div>'; var sTxt=document.getElementById(sN+'in'); var eH=objHeight(sTxt); sTxt.style.top=(dR? -eH : sH)+'px'; sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)'; setInterval(function() {scrF(sTxt.style,sH,eH);},1000/speed);}
window.onload = addScrollers;
                  