//alert('home.js caricato....');

//inizio nuove finestre

function cielo(a)
{
aria = window.open(a,'800','fullscreen=no,scrollbars=yes,resizable=yes,width=796,height=460,status=no,location=no,menubar=no,toolbar=yes,left=0,top=20');
aria.self.focus();
}

function terra(b)
{
acqua = window.open(b,'600','fullscreen=no,scrollbars=yes,resizable=yes,width=654,height=440,status=no,location=no,menubar=no,toolbar=yes,left=0,top=20');
acqua.self.focus();
}

function chat(c)
{
dgt = window.open(c,'room','fullscreen=no,scrollbars=yes,resizable=yes,width=794,height=470,status=no,location=no,menubar=no,toolbar=yes,left=0,top=20');
dgt.self.focus();
}

function dossier(d)
{
dyn = window.open(d,'790','fullscreen=no,scrollbars=no,resizable=no,width=790,height=480,status=no,location=no,menubar=no,toolbar=yes,left=0,top=20');
dyn.self.focus();
}

// fine nuove finestre

function sond(page)
{
opt='toolbar=no,scrollbars=yes,resizable=no,directories=no,menubar=no,status=no';
NewCenteredWindow(page, 'CenteredWindow', 418, 330, opt);
}

function NewCenteredWindow(mypage, myname, w, h, windowOptions) {
  var winl = (screen.width - w) / 2;
  var wint = (window.height - h) / 2;
  var winprops = windowOptions;
  if (winprops.length > 0) winprops += ",";
  winprops += 'height='+h+',width='+w+',top='+wint+',left='+winl;
  win = window.open(mypage, myname, winprops);
  if (parseInt(navigator.appVersion) >= 4) {
    win.window.focus();
  }
}

function NewWindow2(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=yes,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 680, 420, opt);
}

function cerca(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,menubar=no,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 450, 540, opt);
}

function NewWindow3(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,menubar=no,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 790, 480, opt);
}

function NewWindowchat(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,menubar=no,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 790, 480, opt);
}

function NewWindow4(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,menubar=no,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 790, 480, opt);
}

/**/
function NewWindow5(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=yes,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 680, 420, opt);
}

function nuova(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 680, 420, opt);
}

function NewWindowSond_SMS(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=yes,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 470, 420, opt);
}

function NewWindowSond(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=yes,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 680, 420, opt);
}

function NewWindowweb(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=no,menubar=no,status=no';
NewCenteredWindow(page, 'CenteredWindow', 800, 600, opt);
}

function NewWindownew(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=no,menubar=no,status=no';
NewCenteredWindow(page, 'CenteredWindow', 760, 600, opt);
}

function NewWindow_dos(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=no,directories=no,url=yes,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 790, 510, opt);
}

function NewWindowMenu(jamme1)
{
opt='toolbar=no,scrollbars=no,resizable=no,directories=no,menubar=no,status=no,top=20,left=20,width=455,height=335';
fine = window.open(jamme1, 'YYY_consol', opt);
fine.self.focus();
}

function NewWindowMenu2(jamme2)
{
opt='toolbar=no,scrollbars=yes,resizable=no,directories=no,menubar=no,status=no,top=20,left=20,width=660,height=500';
fine2 = window.open(jamme2, 'xxx_consol', opt);
fine2.self.focus();
}

function NewWindowMenu3(jamme3)
{
opt='toolbar=no,scrollbars=yes,resizable=yes,directories=no,menubar=no,status=no,top=20,left=20,width=680,height=500';
fine3 = window.open(jamme3, 'xxx_consol', opt);
fine3.self.focus();
}

function WindowNews(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=no,menubar=no,status=no';
NewCenteredWindow(page, 'CenteredWindow', 760, 600, opt);
}

function WindowsNews(page)
{
opt='toolbar=yes,scrollbars=yes,resizable=yes,directories=no,url=yes,menubar=yes,status=yes';
NewCenteredWindow(page, 'CenteredWindow', 680, 420, opt);
}

function apriNotizia( idNotizia, idArgomento, idTipologia ){
  if (idTipologia == 1000001){
    dossier('dossier/index_home.phtml?idnotizia=' + idNotizia + '&idargomento=' + idArgomento);
      }else{
    window.location = 'notizia.phtml?IDNOTIZIA='+idNotizia+'&IDARGOMENTO='+idArgomento;
  }
}
