function setupLinks() { arrLinks[0] = "http://questure.poliziadistato.it/it/Agrigento/articolo/18065bf6d837d316a917321171"; arrTitles[0] = "Operazione “ Scuole Sicure”."; arrLinks[1] = "http://questure.poliziadistato.it/it/Torino/articolo/6905bf6d72745d17913552272"; arrTitles[1] = "Torino: arrestato autore di diversi furti ai danni di bar del centro"; arrLinks[2] = "http://questure.poliziadistato.it/it/Rovigo/articolo/6645bf6d6d99cf7a926357383"; arrTitles[2] = "Giovane arrestato dalla Volante"; arrLinks[3] = "http://questure.poliziadistato.it/it/Torino/articolo/6905bf6d698e585b560991509"; arrTitles[3] = "Torino: controllo straordinario del territorio -progetto SCUOLE SICURE-"; arrLinks[4] = "http://questure.poliziadistato.it/it/Lecco/articolo/12625bf6d5c22c86c433152389"; arrTitles[4] = "BLOCCATI MENTRE SI PREPARAVANO A COMPIERE L’ENNESIMA “TRUFFA DELLO SPECCHIETTO” AGLI ANZIANI.DENUNCIATI DUE ITALIANI PREGIUDICATI."; } 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); }