﻿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() {
        var ifr = document.getElementById("frmAllegati");
        var h = ifr.contentWindow.document.getElementById("txtAltezza").value;
        ifr.setAttribute("height", h + 'px');      
    }


   
