var spostX = 40; 
var spostY = 0;  

var speedF = 50;  

var larghF = 215; 
var altezF = 396; 
var dimenF = 'no';
var distaX = window.screen.width-200; 
var distaY = 300; 


var pagina = "spot/spot.html" 
var aperturaAutomatica = true; 

function Fluttuante(finestra,maxx,maxy,vel) {this.xn = 0;this.yn = 0;this.xm = maxx;this.ym = maxy;if (maxx<0) this.xd = -1;else if (maxx>0) this.xd = 1;else this.xd = 0;if (maxy<0) this.yd = -1;else if (maxy>0) this.yd = 1;else this.yd = 0;this.ww = finestra;this.sp = vel;}function muovi(fin) {if (!fin.ww.closed) {  fin.ww.moveBy(fin.yd,fin.xd);  fin.xn++; fin.yn++;  if ((fin.xd!=0)&&(fin.xn>fin.xm)) { fin.xn=0; fin.xd *= -1; }  if ((fin.yd!=0)&&(fin.yn>fin.ym)) { fin.yn=0; fin.yd *= -1; }  setTimeout("muovi(finestraFluttuante)",finestraFluttuante.sp); }}function changeStatus(fin) {  if (!fin.ww.closed) fin.ww.close();  else {   window.popUp1 = window.open(window.pagina,window.titolo, "width="+window.larghF+",height="+window.altezF+",resizable="+window.dimenF);   window.popUp1.moveTo(window.distaX,window.distaY);   window.finestraFluttuante = new Fluttuante(window.popUp1,window.spostX,window.spostY,window.speedF);   window.muovi(finestraFluttuante);  }}var popUp1 = new Object();popUp1.closed = true;var finestraFluttuante = new Fluttuante(popUp1,spostX,spostY,speedF);if (aperturaAutomatica) changeStatus(finestraFluttuante);
