var defaultWidth=640;var defaultHeight=480;function create_alias(a){var b=LRTrim(a);b=b.replace(/<[^>]*>/g,"");b=b.replace(/\n/gi," ");b=b.replace(/&nbsp;/gi," ");b=Lower(b);b=Strtran(b,"-"," ");b=Strtran(b," ","_");b=Strtran(b,'"',"_");b=Strtran(b,"#","_");b=Strtran(b,"%","_");b=Strtran(b,"+","_");b=Strtran(b,"/","_");b=Strtran(b,":","_");b=Strtran(b,";","_");b=Strtran(b,"<","_");b=Strtran(b,">","_");b=Strtran(b,"?","_");b=Strtran(b,"&","_");b=Strtran(b,"!","_");b=Strtran(b,"(","_");b=Strtran(b,")","_");b=Strtran(b,"'","_");b=Strtran(b,",","_");b=Strtran(b,";","_");b=Strtran(b,".","_");return b}function removeZero(a){for(var b=0;b<=a.length;b++){if(Left(a,1)=="0"){a=a.substr(1,a.length);b=0}else{return a}}return a}function get_titleCmsnl(d){var a="../servlet/ponl_fget_title?m_cAction=function&p_CMCONTENTID="+d;var c=new ZtVWeb.JSURL(a,a.length>2048);var b=c.Response();if(b.indexOf("Function return value:")<0){b="page"}else{b=b.substring(b.indexOf("Function return value:")+22,b.indexOf(" -->"));while(Right(b,1)==String.fromCharCode(13)||Right(b,1)==String.fromCharCode(10)){b=Left(b,b.length-1)}}return b}function get_titleCms(d){var a="../servlet/pocs_fget_title?m_cAction=function&p_CMCONTENTID="+d;var c=new ZtVWeb.JSURL(a,a.length>2048);var b=c.Response();if(b.indexOf("Function return value:")<0){b="page"}else{b=b.substring(b.indexOf("Function return value:")+22,b.indexOf(" -->"));while(Right(b,1)==String.fromCharCode(13)||Right(b,1)==String.fromCharCode(10)){b=Left(b,b.length-1)}}return b}function openLinkCms(f,e,a,c,d){var b="../cms/"+create_alias(e)+"-"+removeZero(f)+".html";openLink(b,a,c,d)}function openLinkCms(f,a,c,d){var e=get_titleCms(f);var b="../cms/"+create_alias(e)+"-"+removeZero(f)+".html";openLink(b,a,c,d)}function openLink(a){openLink(a,defaultWidth,defaultHeight)}function openLink(b,a,c){openLink(b,a,c,target)}function openLink(url,w,h,target){var cartellaCms="cms";var functionTitolo="get_titleCms";if(url.indexOf("pocs_bnav")>-1||url.indexOf("ponl_bnav")>-1){if(url.indexOf("ponl_bnav")>-1){cartellaCms="cmsnl";functionTitolo="get_titleCmsnl"}if(url.indexOf("p_contentTopic")>-1){id_content=url.substr(url.indexOf("p_contentTopic")+15,10);var title=eval(functionTitolo+"(id_content)");var url="../"+cartellaCms+"/"+create_alias(title)+"-"+removeZero(id_content)+".html"}else{if(url.indexOf("p_containerTopic")>-1){id_container=url.substr(url.indexOf("p_containerTopic")+17,10);title=eval(functionTitolo+"(id_container)");if(url.indexOf("p_Navigator")>-1){id_navigator=url.substr(url.indexOf("p_Navigator")+12,10);var url="../"+cartellaCms+"/"+create_alias(title)+"-"+removeZero(id_container)+"-"+removeZero(id_navigator)+".html"}else{var url="../"+cartellaCms+"/"+create_alias(title)+"-"+removeZero(id_container)+"-"+removeZero(id_container)+".html"}}}openLink(url,w,h,target)}else{if(target==undefined){target="_blank"}var left=Math.ceil((screen.width-w)/2);var top=Math.ceil((screen.height-h)/2);var style="toolbar=no,scrollbars=no,resizable=yes,width="+w+",height="+h+",top="+top+",left="+left;if(url.substring(0,10)=="../servlet"){url=absoluteUrl(url)}window.open(url,target,style)}}function openLinkRS(a){openLinkRS(a,defaultWidth,defaultHeight)}function openLinkRS(b,a,c){openLinkRS(b,a,c,target)}function openLinkRS(b,a,d,g){if(g==undefined){g="_blank"}var f=Math.ceil((screen.width-a)/2);var e=Math.ceil((screen.height-d)/2);var c="toolbar=no,scrollbars=no,resizable=no,width="+a+",height="+d+",top="+e+",left="+f;if(b.substring(0,10)=="../servlet"){b=absoluteUrl(b)}window.open(b,g,c)}function openLinkSB(a){openLinkSB(a,defaultWidth,defaultHeight)}function openLinkSB(b,a,c){openLinkSB(b,a,c,target)}function openLinkSB(b,a,d,g){if(g==undefined){g="_blank"}var f=Math.ceil((screen.width-a)/2);var e=Math.ceil((screen.height-d)/2);var c="toolbar=no,scrollbars=yes,resizable=yes,width="+a+",height="+d+",top="+e+",left="+f;if(b.substring(0,10)=="../servlet"){b=absoluteUrl(b)}window.open(b,g,c)}function stringToDate(h){var g=h.substring(0,4);var c=h.substring(5,7);var d=h.substring(8,10);var a=h.substring(11,13);var b=h.substring(14,16);var e=h.substring(17,19);var j=h.substring(20,23);var f=new Date(g,c-1,d,a,b,e,j);return f}function DateTimeFormat(a){if(typeof(a)=="string"){if(!(Empty(a))){a=Strtran(a,"-","");a=Strtran(a,":","");a=Strtran(a," ","");DateFormatted=FormatDateTime(CharToDateTime(a),"DD-MM-YYYY hh:mm:ss")}else{DateFormatted=""}}else{try{if(typeof(a)=="object"&&a.constructor==Date){if(a.getHours()>0||a.getMinutes()>0||a.getSeconds()>0){DateFormatted=FormatDateTime(a,"DD-MM-YYYY hh:mm:ss")}else{DateFormatted=FormatDate(a,"DD-MM-YYYY")}}}catch(b){return""}}return DateFormatted}function openCont(framename,url){framename=LRTrim(framename);if(window.name==framename){window.location=url}else{if(parent.window.name==framename){parent.window.location=url}else{eval("window."+framename+".location=url")}}}function checkLink(b){var a=window.location.protocol+"//";if(b.substring(0,a.length)==a){window.open(b)}else{window.open(a+b)}}function absoluteUrl(c){var b=window.location.protocol+"//";if(c.substring(0,b.length)!=b){var e=window.location.pathname;if(e.substr(0,1)!="/"){e="/"+e}var a=b+window.location.host+e;if(c.substr(0,1)=="/"){var d=window.location.pathname.substring(1,window.location.pathname.length);d=d.substring(0,d.indexOf("/"));var a=b+window.location.host+"/"+d;c=a+c}else{a=a.substring(0,a.lastIndexOf("/")+1);c=a+c}}return c}function formatMoneyAmount(b,d,a,e){if(typeof e=="undefined"){e=0}var c=Val(b);if(c==0){return e+" "+d}else{return(GASPLib.Transform(c,GASPLib.PS(20,a))+" "+d)}}function PlatformPathStart(a){return"../servlet/"+a}function getImage(d,c,a,b,e){var f=null;if(typeof(a)!="undefined"){f="../"+a+"/images/"+d}else{f="../images/"+d}if((typeof(b)!="undefined")&&(typeof(e)!="undefined")){return"<IMG BORDER='0' width='"+b+"' height='"+e+"' TITLE='"+c+"' SRC='"+f+"'></IMG>"}else{return"<IMG BORDER='0' TITLE='"+c+"' SRC='"+f+"'></IMG>"}}function getMimeImage(a){var b=null;b="../images/Mime/"+a.toLowerCase();return"<IMG BORDER='0' SRC='"+b+"'></IMG>"}function getLangImage(c,a,b){var d=null;d="../images/Language/flag_"+c.toLowerCase()+".gif";if((typeof(a)!="undefined")){if((typeof(b)!="undefined")){return"<IMG BORDER='0'  TITLE='"+a+"' SRC='"+d+"' class='"+b+"'></IMG>"}else{return"<IMG BORDER='0'  TITLE='"+a+"' SRC='"+d+"'></IMG>"}}else{if((typeof(b)!="undefined")){return"<IMG BORDER='0' SRC='"+d+"' class='"+b+"'></IMG>"}else{return"<IMG BORDER='0' SRC='"+d+"'></IMG>"}}}function getSystemImage(d,a,c,f){var j=null;var b=d.indexOf("SpTheme");if(b>-1){var g=null;for(i=b;i<d.length;i++){if(d.charAt(i)=="/"){g=i;break}}var e=d.substring(b,g);d=Strtran(d,e,a)}j=".."+d;if((typeof(c)!="undefined")&&(typeof(f)!="undefined")){return"<IMG BORDER='0' width='"+c+"' height='"+f+"' SRC='"+j+"'></IMG>"}else{return"<IMG BORDER='0' SRC='"+j+"' style='valign:middle'></IMG>"}}function getParentCSS(f,g){try{if(window.navigator.userAgent.indexOf("MSIE")>0){base=document.styleSheets.length;for(i=0;i<window.parent.document.styleSheets.length;i++){document.createStyleSheet();if(f){document.styleSheets[i].cssText=window.parent.document.styleSheets[i].cssText}else{document.styleSheets[base+i].cssText=window.parent.document.styleSheets[i].cssText}}if(typeof(g)!="undefined"){document.createStyleSheet(g)}}else{var a=parent.document.getElementsByTagName("LINK").length;for(i=0;i<a;i++){var b=parent.document.getElementsByTagName("LINK")[i].getAttribute("href");var d=document.createElement("LINK");d.setAttribute("REL","stylesheet");d.setAttribute("TYPE","text/css");d.setAttribute("HREF",b);document.getElementsByTagName("HEAD").item(0).appendChild(d)}}}catch(c){}}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,false);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}function adjustFrameHeight(){var a=navigator.userAgent.indexOf("MSIE")>0;addEvent(window,"load",new Function("",'setTimeout("afh()",500);'));if(!a){addEvent(window,"unload",new Function("",'parent.document.getElementById("main").style.height = screen.height - 100;'))}}function afh(){try{var b=screen.height-300;parent.document.getElementById("main").style.height=b;var a=document.body.scrollHeight;if(a>b){parent.document.getElementById("main").style.height=a+100}}catch(c){}}function toHtml(a){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");a=a.replace(/@/g,"&cong;");a=a.replace(/"/g,"&quot;");return a}function toHtmlLite(a){a=a.replace(/'/g,"&#39;");return a};
