function setupLinks() { arrLinks[0] = "http://questure.poliziadistato.it/it/Caserta/articolo/3222662e37560956d535622605"; arrTitles[0] = "Ricercato per corruzione, arrestato dalla Polizia di Stato a Casal di Principe."; arrLinks[1] = "http://questure.poliziadistato.it/it/Savona/articolo/1036662e2d78a6273332631236"; arrTitles[1] = "TENTA DI UCCIDERE DUE CONNAZIONALI ARMATO DI DUE COLTELLI, ARRESTATO DALLE VOLANTI"; arrLinks[2] = "http://questure.poliziadistato.it/it/Como/articolo/2957662e0e01b117e973227623"; arrTitles[2] = "Como, intensificato il Controllo del Territorio: nella giornata di sabato più di 200 le persone controllate, 21enne algerino denunciato per furto dalla Polizia di Stato e Esercito Italiano."; arrLinks[3] = "http://questure.poliziadistato.it/it/Torino/articolo/3210662dfdbacb387535312775"; arrTitles[3] = "La Polizia di Stato arresta 2 uomini"; arrLinks[4] = "http://questure.poliziadistato.it/it/Torino/articolo/3210662dfcc52fab9752739588"; arrTitles[4] = "Controlli della Polizia di Stato nel quartiere Barriera Nizza"; } var m_iInterval; var m_Height; var iScroll=0; var arrLinks; var arrTitles; var arrCursor = 0; var arrMax; window.onload=wl; function wl() { m_iInterval = setInterval(ontimer, 100); var base = document.getElementById("jump_base"); m_Height = base.offsetHeight; var divi = parseInt(m_Height/5); m_Height = divi*5; var td1 = document.getElementById("td1"); var td2 = document.getElementById("td2"); var td3 = document.getElementById("td3"); td1.height = m_Height-5; td2.height = m_Height-5; td3.height = m_Height-5; arrLinks = new Array(); arrTitles = new Array(); setupLinks(); arrMax = arrLinks.length-1; setLink(); } function setLink() { var ilink = document.getElementById("jump_link"); ilink.innerHTML = arrTitles[arrCursor]; ilink.href = arrLinks[arrCursor]; } function ontimer() { var base = document.getElementById("jump_base"); iScroll+=5; if (iScroll>(m_Height*2)) { iScroll=0; arrCursor++; if (arrCursor>arrMax) arrCursor=0; setLink(); } if (iScroll==m_Height) { pause(); m_iInterval = setTimeout(resume, 6000); } base.scrollTop=iScroll; } function pause() { clearInterval(m_iInterval); } function resume() { m_iInterval = setInterval(ontimer, 100); }