function loadDoc(url, cFunction,idpost) {var xhttp; xhttp=new XMLHttpRequest(); xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {cFunction(this,idpost);}}; xhttp.open("GET", url, true); xhttp.send();} function myFunctionnrletture(xhttp,idpost) {document.getElementById("nrletture"+idpost).innerHTML = xhttp.responseText; } function contaclick(url) {var xhttp; xhttp=new XMLHttpRequest(); xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {cFunction(this);}}; xhttp.open("GET", url, true); xhttp.send();} function loadDiv(divdagestire,url) {var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200){document.getElementById(divdagestire).innerHTML = this.responseText;}}; xhttp.open("GET", url, true); xhttp.send();} function richiamaattenzionesucommento(a) {document.getElementById("commento"+a).style.height="auto"; document.getElementById("commento"+a).style.padding="2px 2px 10px 2px"; if(document.getElementById("commento"+a+"giu").style.display=="block") {document.getElementById("commento"+a+"giu").style.display="none"; document.getElementById("commento"+a+"su").style.display="block"}}; var n=0;function pageScroll(x,h) {window.scrollBy(0,-5); var n=x+1; if(n==h){return;}; scrolldelay = setTimeout('pageScroll('+n+','+h+')',10);} function colorFade(j,k,s,p,h,n){var l,m,o,a,c,i,d,e,q,i;var f=document.getElementById(j);h=h||20;n=n||20;clearInterval(f.timer);m=colorConv(p);o=m[0];a=m[1];c=m[2];if(!f.r){l=colorConv(s);r=l[0];g=l[1];b=l[2];f.r=r;f.g=g;f.b=b}d=Math.round(Math.abs(f.r-o)/h);e=Math.round(Math.abs(f.g-a)/h);q=Math.round(Math.abs(f.b-c)/h);if(d==0){d=1}if(e==0){e=1}if(q==0){q=1}f.step=1;f.timer=setInterval(function(){animateColor(j,k,h,o,a,c,d,e,q)},n)}function animateColor(j,k,s,p,h,n,l,m,o){var a=document.getElementById(j);var c;if(a.step<=s){var i=a.r;var d=a.g;var e=a.b;if(i>=p){i=i-l}else{i=parseInt(i)+parseInt(l)}if(d>=h){d=d-m}else{d=parseInt(d)+parseInt(m)}if(e>=n){e=e-o}else{e=parseInt(e)+parseInt(o)}c='rgb('+i+','+d+','+e+')';if(k=='background'){a.style.backgroundColor=c}else if(k=='border'){a.style.borderColor=c}else{a.style.color=c}a.r=i;a.g=d;a.b=e;a.step=a.step+1}else{clearInterval(a.timer);c='rgb('+p+','+h+','+n+')';if(k=='background'){a.style.backgroundColor=c}else if(k=='border'){a.style.borderColor=c}else{a.style.color=c}}}function colorConv(j){var k=[parseInt(j.substring(0,2),16),parseInt(j.substring(2,4),16),parseInt(j.substring(4,6),16)];return k} function myFunctionsticky (itemdaelaborare,altezzadiv) { itemcontenitore=itemdaelaborare; itemcontenuto=itemdaelaborare+'itemcontenuto'; titolosezione=itemdaelaborare+'titolosezione'; chiudiintitolo=itemdaelaborare+'chiudiintitolo'; var div0 = document.getElementById(itemcontenitore); var div1 = document.getElementById(itemcontenuto); var divoffset= div1.offsetHeight+'px'; var div2 = document.getElementById(titolosezione); var div4 = document.getElementById(chiudiintitolo); if (div0.style.height !== altezzadiv + 'px') { div4.innerHTML='⏬'; div0.scrollIntoView();window.scrollBy(0,-25); colorFade(itemdaelaborare,'background','ff66ff','ffffff',500,1); div0.style.height = altezzadiv + 'px'; div0.style.overflow = 'hidden'; } else {div4.innerHTML='⏫'; div0.style.overflow = 'visible'; if (window.screen.width>768){div0.style.height = "auto"; } else {var hdiv0=div0.scrollHeight; div0.style.height = hdiv0+"px"; } } };