function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function flvFPW1(){//v1.43
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var v1=arguments,v2=v1[2].split(","),v3=(v1.length>3)?v1[3]:false,v4=(v1.length>4)?parseInt(v1[4]):0,v5=(v1.length>5)?parseInt(v1[5]):0,v6,v7=0,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18;if (v4>1||v1[2].indexOf("%")>-1){v10=screen.width;for (v6=0;v6<v2.length;v6++){v18=v2[v6].split("=");if (v18[0]=="width"){v8=parseInt(v18[1]);if (v18[1].indexOf("%")>-1){v8=(v8/100)*v10;v2[v6]="width="+v8;}}if (v18[0]=="left"){v9=parseInt(v18[1]);v11=v6;}}if (v4==2){v7=(v10-v8)/2;v11=v2.length;}else if (v4==3){v7=v10-v8-v9;}v2[v11]="left="+v7;}if (v5>1||v1[2].indexOf("%")>-1){v14=screen.height;for (v6=0;v6<v2.length;v6++){v18=v2[v6].split("=");if (v18[0]=="height"){v12=parseInt(v18[1]);if (v18[1].indexOf("%")>-1){v12=(v12/100)*v14;v2[v6]="height="+v12;}}if (v18[0]=="top"){v13=parseInt(v18[1]);v15=v6;}}if (v5==2){v7=(v14-v12)/2;v15=v2.length;}else if (v5==3){v7=v14-v12-v13;}v2[v15]="top="+v7;}v16=v2.join(",");document.MM_returnValue=false;v17=window.open(v1[0],v1[1],v16);if (v3){v17.focus();}return v17;
}

function KW_expertPopup(sc,iw,ih,mg,wd,hg,sb,fs,bg,tl,nr,ms,cs,cb){
	pw=(wd!=0)?wd:(iw+mg*2);ph=(hg!=0)?hg:(ih+mg*2);psw=parseInt(screen.width/2-pw/2);
	psh=parseInt(screen.height/2-ph/2);
	if (fs) {pw=screen.width;ph=screen.height;psh=0;psw=0;mg=0}
	look="width="+pw+",height="+ph+",screenX="+psw+",screenY="+psh+",left="+psw+",top="+psh
	if (sb==1) look+=",scrollbars=yes"
	pStr="<ht"+""+"ml><he"+""+"ad><ti"+""+"tle>"+tl+"</ti"+""+"tle><META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></he"+""+"ad><st"+""+"yle type=\"text/css\"> <!-- BODY {  margin : "+mg+"px; } --> </style><bo"+""+"dy bgcolor="+bg+"  marginwidth=\"0\" marginheight=\"0\""
	if (cs!=0) pStr+="onLoad=\"setTimeout('window.close()',"+cs+")\" "
	if (cb!=0) pStr+="onBlur=\"window.close()\""
	pStr+=">"
	if (nr!=0) pStr+="<scr"+""+"ipt>  var msg=\""+ms+"\";function disableIE() {if (document.all) {alert(msg);return false;}} function disableNS(e){ if (document.layers||(document.getElementById&&!document.all)) {  if (e.which==2||e.which==3) {alert(msg);return false;} }} if (document.layers) {  document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;} else {  document.onmouseup=disableNS;document.oncontextmenu=disableIE;} document.oncontextmenu=new Function('alert(msg);return false')</sc"+""+"ript>"
	if (fs)
	pStr+="<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td ><div align=\"center\"><"+""+"a hr"+""+"ef='javasc"+""+"ript:self.close();'><img src='"+sc+"' border=0 alt=\"Click Image to Close\"></"+""+"a></div></td></tr></table></bo"+""+"dy></ht"+""+"ml>"
	else
	pStr+="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td ><"+""+"a hr"+""+"ef='javasc"+""+"ript:self.close();'><img src='"+sc+"' border=0 alt=\"Click Image to Close\"></"+""+"a></td></tr></table></bo"+""+"dy></ht"+""+"ml>"
	popwin=window.open('','',look);
	popwin.document.open();
	popwin.document.write(pStr);
	popwin.document.close();
}



function P7_getWD(tDim){ //v2.5 by PVII
 var sh=0,sw=0,rt=0;if(window.innerWidth){sh=window.innerHeight;sw=window.innerWidth;
 }else if(document.body){sh=document.body.clientHeight;sw=document.body.clientWidth;
 if(document.body.offsetHeight==sh&&document.documentElement&&document.documentElement.clientHeight){
  sh=document.documentElement.clientHeight;}
 if(document.body.offsetWidth==sw&&document.documentElement&&document.documentElement.clientWidth) {
 sw=document.documentElement.clientWidth;}}rt=(tDim=="width")?sw:sh;return rt;
}

function P7_getLDims(el) { //v2.5 by PVII
 var x,ll=0,tl=0,hh=0,ww=0,wx,g,gg;
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;ll=parseInt(gg.left);
 tt=parseInt(gg.top);if(isNaN(ll)){if(g.currentStyle){ll=parseInt(g.currentStyle.left);
 }else if(document.defaultView&&document.defaultView.getComputedStyle){
 ll=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("left"));
 }if(isNaN(ll)){ll=0;}}if(isNaN(tt)){if(g.currentStyle){tt=parseInt(g.currentStyle.top);
 }else if(document.defaultView&&document.defaultView.getComputedStyle){
 tt=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}if(isNaN(ll)){tt=0;}}
 if(document.all||document.getElementById){ww=parseInt(g.offsetWidth);hh=parseInt(g.offsetHeight);
 if(!ww){ww=parseInt(g.style.pixelWidth);if(!ww){ww=parseInt(g.style.width);}}if(!hh){
 hh=parseInt(g.style.pixelHeight);}if(g.hasChildNodes&&g.childNodes){for(x=0;x<g.childNodes.length;x++){
 wx=parseInt(g.childNodes[x].offsetWidth);if(wx>ww){ww=wx;}}}}else if(document.layers){
 ww=parseInt(g.clip.width);hh=parseInt(g.clip.height);}}var aR=[ll,tt,hh,ww];return aR;
}

function P7_alignRR() { //v2.5 by PVII
 var i;if(!document.p7alignRR) {return;}if(document.layers){
 if(innerWidth!=document.p7RRiw || innerHeight!=document.p7RRih){location.reload();}
 }else{document.p7RR=1;for(i=0;i<p7aRR.length;i++){eval(p7aRR[i]);}document.p7RR=0;}
}

function P7_alignWD2() { //v2.5 by PVII
 var g,gg,lp=0,tp=0,aL,lh,lw,ww,wh,pa='px',args=P7_alignWD2.arguments;if(document.layers||window.opera){pa='';}
 for(var i=0;i<args.length;i+=4){if((g=MM_findObj(args[i]))!=null){gg=(document.layers)?g:g.style;
 mm=parseInt(args[i+1]);mr=parseInt(args[i+2]);ml=parseInt(args[i+3]);ww=parseInt(P7_getWD('width'));
 wh=parseInt(P7_getWD('height'));aL=P7_getLDims(args[i]);lh=aL[2];lw=aL[3];tp=aL[1];lp=aL[0];
 if(mm==1){lp=mr;}if(mm==2){lp=parseInt((ww-lw-mr)/2);if(lp<0){lp=0;}}if(mm==3){lp=ww-lw-mr;if(lp<ml){lp=ml;}}
 if(mm==4){tp=parseInt((wh-lh-mr)/2);if(tp<0){tp=0;}}if(mm==5){tp=parseInt((wh-lh)/2);lp=parseInt((ww-lw)/2);
 if((lp-mr)<=0){lp=mr;}if((tp-ml)<=0){tp=ml;}}if(mm==6){tp=wh-lh-mr;}gg.top=tp+pa;gg.left=lp+pa;
 if(!document.p7alignRR){p7aRR=new Array();document.p7alignRR=true;document.p7RR=0;
 if(document.layers){document.p7RRiw=innerWidth;document.p7RRih=innerHeight;}onresize=P7_alignRR;}
 if(document.p7RR==0){p7aRR[p7aRR.length]="P7_alignWD2('"+args[i]+"',"+mm+","+mr+","+ml+")";}}}
}




function openImageWindow(imageName,top,left,menubar,imageWidth,imageHeight,alt) {
newWindow = window.open("","newWindow","top="+top+",left="+left+",menubar="+menubar+",width="+imageWidth+",height="+imageHeight);
newWindow.document.open();
newWindow.document.write('<HTML><TITLE>'+alt+'</TITLE><BODY bgcolor="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" onBlur="self.close()">'); 
newWindow.document.write('<IMG SRC='+imageName+' WIDTH='+imageWidth+' HEIGHT='+imageHeight+' ALT='+alt+'>'); 
newWindow.document.write('</BODY></HTML>');
newWindow.document.close();
newWindow.focus();} 


var secondafinestra=null;
function apri(quella,opzioni)
{
if (secondafinestra != null)
if (!secondafinestra.closed)
secondafinestra.close();
secondafinestra = window.open(quella,"nuovafinestra",opzioni);
secondafinestra.focus();
}
