// JavaScript Document // Portal 1 Obj (richede jQuery) // versione per il JSON // la funzione restituisce in un array // la larghezza e l'altezza della pagina reale(scroll compreso) e la larghezza e l'altezza della finestra visibile function htmlencode(str) { return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); } function htmldecode(str) { return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); } function getPageSize() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; }else if (document.body.scrollHeight > document.body.offsetHeight){ xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; }else{ xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { if(document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; }else{ windowWidth = self.innerWidth; } windowHeight = self.innerHeight; }else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; }else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if(yScroll < windowHeight){ pageHeight = windowHeight; }else { pageHeight = yScroll; } if(xScroll < windowWidth){ pageWidth = xScroll; }else{ pageWidth = windowWidth; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); return arrayPageSize; } pi = { loader : { id : ('pml_'+Math.random()).replace('.',''), debug : false, debugLength : 4000, debugMsg : 'Si é verificato un errore non previsto!', opacityClass: 'pmm_body_content', speedIn : 0,//'fast', speedOut : 0,//'fast', anchor : 'container', focusOnExit : false, focusOnError: false, onClose : false, restText : true, silentCall : false, silentCallPreserve: false, text : { value : "Caricamento in corso ...", id : ('pml_txt_'+Math.random()).replace('.',''), set : function(t){ if(t!=undefined){this.value = t;} if($('#'+this.id)){$('#'+this.id).html(this.value);} }, append : function(t){ this.value += t; if($('#'+this.id)){$('#'+this.id).html(this.value);} } }, active : function(){ return ($('#'+this.id).length != 0); }, start : function(){ if(!this.active()){ var my_x = (((document.body.clientWidth-500)/2))+window.pageXOffset; var my_y = (((window.innerHeight-140)/2))+window.pageYOffset; var pagesize = getPageSize(); $('body').append('