function URLEncode(e){var g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";var b="0123456789ABCDEF";var f="";for(var c=0;c<e.length;c++){var d=e.charAt(c);if(d==" "){f+="+"}else{if(g.indexOf(d)!=-1){f+=d}else{var a=d.charCodeAt(0);if(a>255){alert("Unicode Character '"+d+"' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted.");f+="+"}else{f+="%";f+=b.charAt((a>>4)&15);f+=b.charAt(a&15)}}}}return f}function URLDecode(e){var a="0123456789ABCDEFabcdef";var d="";var b=0;while(b<e.length){var c=e.charAt(b);if(c=="+"){d+=" ";b++}else{if(c=="%"){if(b<(e.length-2)&&a.indexOf(e.charAt(b+1))!=-1&&a.indexOf(e.charAt(b+2))!=-1){d+=unescape(e.substr(b,3));b+=3}else{alert("Bad escape combination near ..."+e.substr(b));d+="%[ERROR]";b++}}else{d+=c;b++}}}return d}function _dialog_footer(a){if(typeof(a)=="undefined"){a="black"}win="</div>";win+="</td>";win+='<td class="dialog_'+a+'_e"></td>';win+="</tr>";win+="<tr>";win+='<td class="dialog_'+a+'_sw"></td>';win+='<td class="dialog_'+a+'_s"></td>';win+='<td class="dialog_'+a+'_se"></td>';win+="</tr>";win+="</table>";win+="</div>";return win}function _dialog_header(h,g,f,a,e,c,d,b){if(typeof(c)=="undefined"){c="black"}else{if(c==""){c="black"}}if(typeof(d)=="undefined"){d="divJSDialogContent"}else{if(d==""){d="divJSDialogContent"}}if(typeof(b)=="undefined"){b=true}mtw=a-60;tl=mtw/6;h=URLDecode(h);if(h.length>tl){h=h.substr(0,tl-1)+"..."}win='<div style="position: absolute; left: '+f+"px; top: "+g+'px" id="jsWindow">';win+='<table class="text textBlanc" style="width: '+a+"px; height: "+e+'px;" cellpadding="0" cellspacing="0">';win+='<tr style="cursor:pointer;" id="jsWindowHandle">';win+='<td class="dialog_'+c+'_nw"></td>';win+='<td class="dialog_'+c+'_n3">';win+='<div style="float:left;" class="dialog_'+c+'_n1"><p style="margin-top:20px;">&nbsp;'+h+"</p></div>";win+='<div style="float:left;" class="dialog_'+c+'_n2">&nbsp;</div>';if(b){win+='<div class="dialog_'+c+'_close_down" id="btnCloseDialog" onclick="closeDialog();" onMouseOver="rollover(this);" onMouseOut="rollout(this);"></div></td>'}win+='<td class="dialog_'+c+'_ne"></td>';win+="</tr>";win+="<tr>";win+='<td class="dialog_'+c+'_w"></td>';win+='<td style="vertical-align: top; text-align: center;height:'+(e-20)+'px">';win+='<div id="'+d+'" style="background:#fff;color:#000;width:'+(a-36)+'px;height:100%;">';return win}function closeDialog(){fadeOutScreen();el=document.getElementById("jsWindow");js=document.getElementById("jsDialog");if(el){el.parentNode.removeChild(el)}if(js){js.parentNode.removeChild(js)}}function ecms_confirm(a,b){if(confirm(a)){window.location.href=b}}function getPageSizeWithScroll(){if(window.innerHeight&&window.scrollMaxY){yWithScroll=window.innerHeight+window.scrollMaxY;xWithScroll=window.innerWidth+window.scrollMaxX}else{if(document.body.scrollHeight>document.body.offsetHeight){yWithScroll=document.body.scrollHeight;xWithScroll=document.body.scrollWidth}else{yWithScroll=document.body.offsetHeight;xWithScroll=document.body.offsetWidth}}arrayPageSizeWithScroll=new Array(xWithScroll,yWithScroll);return arrayPageSizeWithScroll}function fadeInScreen(){ps=getPageSizeWithScroll();div='<div class="fade_screen" style="width:'+ps[0]+"px;height:"+ps[1]+'px" id="_fade_div">&nbsp;</div>';var a=document.createElement("div");a.innerHTML=div;document.getElementsByTagName("body")[0].appendChild(a);a.style.top="0px";a.style.left="0px"}function fadeOutScreen(){el=document.getElementById("_fade_div");if(el){el.parentNode.removeChild(el)}}function openAjaxDialog(g,d,b,a){var c=460;var f=370;var h={success:function(q){el=document.getElementById("divJSDialogContent");var i='<script id="initDlgScript" type="text/javascript">';var p="<\/script>";var n="";var l="";startScript=q.responseText.indexOf(i);endScript=q.responseText.indexOf(p);if(startScript>-1){l=q.responseText.substring(0,startScript-1);n=q.responseText.substring(startScript+i.length,endScript-1);var k=document.getElementsByTagName("head")[0];var j=document.getElementById("jsDialog");if(!j){j=document.createElement("script")}j.type="text/javascript";j.id="jsDialog";j.text=n;k.appendChild(j);el.innerHTML=l}else{el.innerHTML=q.responseText}if(q.responseText.indexOf("tabber")>-1){var m=({});el=document.getElementById("dialog_tabber_object");tabber=new tabberObj(m);tabber.init(el)}if(q.responseText.indexOf("InputTextMandatory")>-1){checkMandatoryStartup()}if(q.responseText.indexOf("jsInitDialog()")>-1){jsInitDialog()}},upload:function(i){this.success(i)}};if(typeof(a)=="undefined"){a=true}openDialog(g,'<div style="left:'+(c-20)+"px;top:"+(((f-50)/2)-15)+'px;"><img src="/templates/noe/img/loading.gif" width="41" height="39" /></div>',c,f,b,"",a);var e=YAHOO.util.Connect.asyncRequest("GET",d,h)}function openAlert(a){dw=350;dh=150;cntnt='<table style="width:100%;height:100%"><tr><td style="text-align:center"><img src="/templates/noe/img/ico/ico_alerta.gif"></td></tr><tr><td style="text-align:center">'+a+"</td></tr></table>";openDialog("Alerta",cntnt,dw,dh,"blue")}function openDialog(i,f,h,e,d,b,j){var c=navigator.userAgent.toLowerCase();var g=c.indexOf("msie ");if(g>0){var a=parseInt(c.substring(g+5,c.indexOf(".",g)))}else{var a=0}if(g>0){winW=document.body.offsetWidth;winH=document.documentElement.clientHeight;if(winH==0){winH=document.body.offsetHeight}}else{winW=window.innerWidth;winH=window.innerHeight}jsLeft=(winW-parseInt(h))/2;if((a==0)||(a>=7)){jsTop=((winH-parseInt(e))/2)+document.documentElement.scrollTop}else{jsTop=((winH-parseInt(e))/2)+document.documentElement.scrollTop}if(d==null){d="black"}if(typeof(j)=="undefined"){j=true}win=_dialog_header(i,jsTop,jsLeft,h,e,d,b,j);win+=unescape(f);win+=_dialog_footer(d);fadeInScreen();dialogWindow=document.createElement("div");dialogWindow.innerHTML=win;dialogWindow.style.top=jsTop+"px";dialogWindow.style.left=jsLeft+"px";document.body.appendChild(dialogWindow);dd=new YAHOO.util.DD("jsWindow");dd.setHandleElId("jsWindowHandle")}function openExtVideoDialog(d,c,a,e,b){incStats(b);if((c==0)||(c=="")){c=800}if((a==0)||(a=="")){a=600}openDialog(d,URLDecode(e),parseInt(c)+36,parseInt(a),"black","divJSDialogResources")}function openFLVDialog(c,b,a){incStats(a);content='<object type="application/x-shockwave-flash" data="/flash/flowplayer/FlowPlayer.swf" width="425" height="350" id="FlowPlayer">';content+='	<param name="allowScriptAccess" value="always" />';content+='	<param name="movie" value="/flash/flowplayer/FlowPlayer.swf" />';content+='	<param name="quality" value="high" />';content+='	<param name="scaleMode" value="showAll" />';content+='	<param name="allowfullscreen" value="false" />';content+='	<param name="wmode" value="transparent" />';content+='	<param name="allowNetworking" value="all" />';content+='	<param name="flashvars" value="config={ ';content+="		autoPlay: false, ";content+="		loop: false, ";content+="		initialScale: 'scale',";content+="		showLoopButton: false,";content+="		showPlayListButtons: false,";content+="     showMenu: false,";content+="     fullScreenScriptURL: '',";content+="		playList: [";content+="			{ url: '/"+b+"', type: 'flv' }";content+="		]";content+='		}" />';content+="</object>";openDialog(c,content,460,370,"black","divJSDialogResources")}function openIMGDialog(c,b,a){incStats(a);margin_top=72;margin_left=36;width=800;height=600;if(navigator.appName.indexOf("Microsoft")!=-1){maxH=document.body.offsetHeight-20}else{maxH=window.innerHeight-16}if(height>maxH){ratio=maxH/height;height=maxH;width=Math.round(width*ratio)}content='<div height="'+height+'"><img src="'+b+'" alt="'+c+'" style="max-width:'+width+"px;width:expression(this.width>"+width+" ? '"+width+"px' : true);max-height:"+height+"px;height:expression(this.height>"+height+"?'"+height+"px':true);\" /></div>";openDialog(c,content,parseInt(width)+margin_left,parseInt(height)+margin_top,"black","divJSDialogResources")}function openMP3Dialog(c,b,a){incStats(a);content='<object data="/flash/webplayer/webplayer.swf" type="application/x-shockwave-flash" width="240" height="64">';content+='<param name="movie" value="/flash/webplayer/webplayer.swf">';content+='<param name="menu" value="false">';content+='<param name="scale" value="noscale">';content+='<param name="bgcolor" value="#C0C0C0">';content+='<param name="flashvars" value="src='+b+'&amp;autostart=yes&amp;loop=no&amp;debug=no">';content+="</object>";openDialog(c,content,276,64,"black","divJSDialogResources")}function openSWFDialog(f,c,d,a,e,b){incStats(b);lastSlash=c.lastIndexOf("/");e=c.substring(0,lastSlash);margin_top=72;margin_left=36;if((d==0)||(d=="")){d=800}if((a==0)||(a=="")){a=600}if(navigator.appName.indexOf("Microsoft")!=-1){maxH=document.body.offsetHeight-20-(margin_top*2)}else{maxH=window.innerHeight-16-(margin_top*2)}if(a>maxH){ratio=maxH/a;a=maxH;d=Math.round(d*ratio)}content="<div>";content+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"  width="'+d+'" height="'+a+'">';content+='<param name="movie" value="'+c+'">';content+='<param name="quality" value="high">';content+='<param name="base" value="'+e+'">';content+='<embed src="'+c+'" quality="high" base="'+e+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+d+'" height="'+a+'"></embed>';content+="</object>";content+="</div>";content+='<div style="text-align:center;margin-top:10px;"><a href="javascript:void(0);" onclick="window.open(\''+c+"');\">"+strNovaFinestra+"</a></div>";openDialog(f,"",parseInt(d)+margin_left,parseInt(a)+margin_top,"black","divJSDialogResources");YAHOO.util.Dom.get("divJSDialogResources").innerHTML=content}function openLink(b,a){incStats(a);window.open(b,"_blank")};