﻿var intPlWeb;
 


function ShowHide(ID, IDtesto) {
    if (document.getElementById(IDtesto).innerText == 'Mostra mappa') {
        document.getElementById(ID).style.display = 'block';
        document.getElementById(IDtesto).innerText = 'Nascondi mappa';
    } else {
        document.getElementById(ID).style.display = 'none';
        document.getElementById(IDtesto).innerText = 'Mostra mappa';
    }
}



 




//pannello per invio mail


    function chiudi(ID) {
       
        document.getElementById(ID).style.display = "none";
        //clearInterval(intPlWeb)
    }

    function vedi(cod,operazione) {
        document.form1.txtCod.value = cod;
        document.form1.txtOperazione.value = operazione;
        document.getElementById("divInvioMail").style.top = String(parseInt(getScrollXY())) + "px";
        document.getElementById("divInvioMail").style.display = "";
        //intPlWeb = setInterval('Riposiziona()', 100)
        //__doPostBack("divInvioMail", cod)
    }

//    function Riposiziona() {
//        document.getElementById("PLSquadra").style.top = String(parseInt(getScrollXY())) + "px";
//    }


    function getScrollXY() {
        var scrOfX = 0, scrOfY = 0;
        if (typeof (window.pageYOffset) == 'number') {
            //Netscape compliant
            scrOfY = window.pageYOffset;
            scrOfX = window.pageXOffset;
        } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
            //DOM compliant
            scrOfY = document.body.scrollTop;
            scrOfX = document.body.scrollLeft;
        } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
            //IE6 standards compliant mode
            scrOfY = document.documentElement.scrollTop;
            scrOfX = document.documentElement.scrollLeft;
        }
        return [scrOfY];
    }



    function ShowHideInfo(ID) {
        if (document.getElementById(ID).style.display == "none") {
            document.getElementById(ID).style.display = "block";
        } else {
            document.getElementById(ID).style.display = "none";
        }
    }


    function MouseOverImmagini(ID,path) {
        document.getElementById(ID).src = "ImgExp/" + path; 
    }


    function MouseOutImmagini(ID, path) {
      document.getElementById(ID).src = "ImgExp/" + path;
    }


    function ChiudiUpload() {
        document.getElementById("PLUpload").style.display = "none";
    }


    function altezzaFrame(nome) { // v.1.0
        //copyright 2004 Eddie Traversa http://www.dhtmlnirvana.com/
        if (!window.opera && !document.mimeType && document.all && document.getElementById) {
            parent.document.getElementById(nome).style.height = this.document.body.offsetHeight + "px";
            //parent.document.getElementById(nome).style.width = this.document.body.offsetWidth + "px";
        }
        else if (document.getElementById) {
            parent.document.getElementById(nome).style.height = this.document.body.scrollHeight + "px"
            //parent.document.getElementById(nome).style.width = this.document.body.scrollWidth + "px"
        }
    }



    function ChangeCat(cat) {
        //Governance
        if (cat == 0)
            document.getElementById('CatGovernance').style.display = '';
        if (cat != 0)
            document.getElementById('CatGovernance').style.display = 'none';

        //Formazione
        if (cat == 1)
            document.getElementById('CatFormazione').style.display = '';
        if (cat != 1)
            document.getElementById('CatFormazione').style.display = 'none';

        //Territorio
        if (cat == 2)
            document.getElementById('CatTerritorio').style.display = '';
        if (cat != 2)
            document.getElementById('CatTerritorio').style.display = 'none';

        //Tutti
        if (cat == 3)
            document.getElementById('CatTutti').style.display = '';
        if (cat != 3)
            document.getElementById('CatTutti').style.display = 'none';
    
    }
   
