/* DYNAMIC+ Optimized JS */


/* toggler */
function switchElement(a,j,d,f,b,h){for(var e=0;e<a.length;e++){var c=document.getElementById(a[e]);if(c){c.style.display="none";}}var l=document.getElementById(j);if(l){l.style.display="block";}for(var e=0;e<d.length;e++){var g=document.getElementById(d[e]);if(g){g.className=b;}}var k=document.getElementById(f);if(k){k.className=h;}}

/* Toggle */
function toggle(b){var a=1;document.getElementById("sub_"+a).style.display="none";document.getElementById(b).style.display="block";}

/* Container_core-min */


/* dropdown */
var timeout=500;var closetimer=0;var ddmenuitem=0;function mopen(a){mcancelclosetime();if(ddmenuitem){ddmenuitem.style.visibility="hidden";}ddmenuitem=document.getElementById(a);ddmenuitem.style.visibility="visible";}function mclose(){if(ddmenuitem){ddmenuitem.style.visibility="hidden";}}function mclosetime(){closetimer=window.setTimeout(mclose,timeout);}function mcancelclosetime(){if(closetimer){window.clearTimeout(closetimer);closetimer=null;}}document.onclick=mclose;

/* textresize */
function resizeText(a){if(!document.getElementById("corpo_articolo")){return;}if(document.getElementById("corpo_articolo").style.fontSize==""){document.getElementById("corpo_articolo").style.fontSize="14px";}if(document.getElementById("corpo_articolo").style.lineHeight==""){document.getElementById("corpo_articolo").style.lineHeight="18px";}document.getElementById("corpo_articolo").style.fontSize=parseFloat(document.getElementById("corpo_articolo").style.fontSize)+(a*1)+"px";document.getElementById("corpo_articolo").style.lineHeight=parseFloat(document.getElementById("corpo_articolo").style.lineHeight)+(a*1)+"px";}

/* conferma download */
function __confirmDocumentDownload(){var a=document.links;for(var b=0;b<a.length;++b){var c=a[b];if(/\.(zip|rar|pdf|doc|docx|xls|xlsx)$/i.test(c.pathname)){c.onclick=function(){return confirm("Desideri scaricare questo documento?");};}}}if(window.addEventListener){window.addEventListener("DOMContentLoaded",__confirmDocumentDownload,false);}else{if(window.attachEvent){window.attachEvent("onload",__confirmDocumentDownload);}}
