function pegaSize(){ 
        var yScroll;
        
        if (window.innerHeight && window.scrollMaxY) {  
                yScroll = window.innerHeight + window.scrollMaxY;
        } else if (document.body.scrollHeight > document.body.offsetHeight){
                yScroll = document.body.scrollHeight;
        } else {
                yScroll = document.body.offsetHeight;
        }
        
        var windowHeight;
        if (self.innerHeight) {
                windowHeight = self.innerHeight;
        } else if (document.documentElement && document.documentElement.clientHeight) {
                windowHeight = document.documentElement.clientHeight;
        } else if (document.body) {
                windowHeight = document.body.clientHeight;
        }       
        
        if(yScroll < windowHeight){
                pageHeight = windowHeight;
        } else { 
                pageHeight = yScroll;
        }
        arraypegaSize = new Array(pageHeight,windowHeight) 
		document.getElementById("popesmae").style.height=arraypegaSize[0]+"px";
}


window.onload=pegaSize;


function fecharPOP(){
document.getElementById("popup").style.display="none";
document.getElementById("popesmae").style.display="none";
}
