
window.onresize = reSize;

function reSize()
{
var XX=0;

var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if(ie){
XX=document.body.clientWidth;
ClearBox.style.left=((XX-900)/2)+290;
MenuServizi.style.left=((XX-900)/2)+311;
MenuContratti.style.left=((XX-900)/2)+382;
}

else if (ns4){
XX=window.innerWidth;
document.ClearBox.pageX=((XX-900)/2)+290;
document.MenuServizi.pageX=((XX-900)/2)+311;
document.MenuContratti.pageX=((XX-900)/2)+382;
}

else if (ns6){
XX=window.innerWidth;
document.getElementById('ClearBox').style.left=((XX-900)/2)+290;
document.getElementById('MenuServizi').style.left=((XX-900)/2)+311;
document.getElementById('MenuContratti').style.left=((XX-900)/2)+382;
}
}

function chkBrowser(){this.ver=navigator.appVersion;this.dom=document.getElementById?1:0;this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;this.ns4=(document.layers && !this.dom)?1:0;this.bVer=(this.ie5 || this.ie4 || this.ns4 || this.ns5);return this;}
bVer=new chkBrowser();ns4 = (document.layers)? true:false;ie4 = (document.all)? true:false;function AttB(f){if(bVer.ie4)f.style.display='block';}function AttN(f){if(bVer.ie4)f.style.display='none';}

function show(idLayer,idParent){
cLayer=bVer.dom?document.getElementById(idLayer).style:bVer.ie4?document.all[idLayer].style:bVer.ns4?idParent?document[idParent].document[idLayer]:document[idLayer]:0;
cLayer.display='block';divLinksForm=(ns4)?document.divLinks.document.divLinks:document.divLinks;}

function hide(idLayer,idParent){cLayer=bVer.dom?document.getElementById(idLayer).style:bVer.ie4?document.all[idLayer].style:bVer.ns4?idParent?document[idParent].document[idLayer]:document[idLayer]:0;
var d=document.Wiz;cLayer.display='none';}



function cambia(objeto,tipo){
   elobjeto=objeto;
   if (tipo == 0){
      if (window.paso2){clearInterval(paso2);}
      paso1=setInterval("baja_opacidad(elobjeto)",40);
   } else {
      if (window.paso1){clearInterval(paso1);}
      paso2=setInterval("sube_opacidad(elobjeto)",40);
   }
}
function baja_opacidad(objeto){
   if (objeto.filters.alpha.opacity >0 ) {
      objeto.filters.alpha.opacity -= 5;
   } else if (window.paso1) {
      clearInterval(paso1);
   }
}
function sube_opacidad(objeto){
   if (objeto.filters.alpha.opacity < 100 ) {
      objeto.filters.alpha.opacity += 5;
   } else if (window.paso2) {
      clearInterval(paso2);
   }
}
function ShowPhoto(URL) {
var externalWin = null;
externalWin = window.open(URL,'ShowPhoto','toolbar=No,location=No,status=No,scrollbars=No,resizable=No,copyhistory=No,topmargin=0,leftmargin=0,width=528,height=548,top=50,left=50');
}
function ShowPlan(URL) {
var externalWin = null;
externalWin = window.open(URL,'ShowPlan','toolbar=No,location=No,status=No,scrollbars=No,resizable=Yes,copyhistory=No,topmargin=0,leftmargin=0,width=528,height=548,top=100,left=100');
}
function ShowClip(URL) {
var externalWin = null;
externalWin = window.open(URL,'ShowClip','toolbar=No,location=No,status=No,scrollbars=No,resizable=No,copyhistory=No,topmargin=0,leftmargin=0,width=160,height=184,top=100,left=100');
}


function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);}

function A_openBrWindow(theURL) {
var externalWin1 = null;
externalWin1 = window.open(theURL,'FotoA','width=300,height=300,top=0,left=0,Resizable=1');
}

function B_openBrWindow(theURL) {
var externalWin2 = null;
externalWin2 = window.open(theURL,'Animazione','width=853,height=480,top=0,left=0,Resizable=1,scrollbars=0,fullscreen=1,titlebar=0,location=0');
}