var win=null;
function loadWin(w, h,n){
win = new Window({
  id: "princwin"+n,
  className: "francesco1", 
  title: "Locanda di Nemo", 
  width:w, 
  height:h,
  resizable: false,
  maximizable:false,
  minimizable: false,
  draggable:false,
destroyOnClose:true
  });
}
function mostra(){
loadWin(766, 680,0);
document.getElementById('fl').style.display='none';
win.setURL('gallery1.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra1(){
loadWin(766, 680,1);
document.getElementById('fl').style.display='none';
win.setURL('gallery2.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra2(){
loadWin(766, 680,2);
document.getElementById('fl').style.display='none';
win.setURL('gallery3.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra3(){
loadWin(766, 680,3);
document.getElementById('fl').style.display='none';
win.setURL('gallery4.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra4(){
loadWin(766, 400,4);
document.getElementById('fl').style.display='none';
win.setURL('baldracca.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra5(){
loadWin(766, 400,5);
document.getElementById('fl').style.display='none';
win.setURL('amici.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra6(){
loadWin(766, 400,6);
document.getElementById('fl').style.display='none';
win.setURL('compagnia.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}
function mostra7(){
loadWin(766, 400,7);
document.getElementById('fl').style.display='none';
win.setURL('dovesiamo.html');
win.showCenter();
win.setCloseCallback(function(){
 win.hide();
 document.getElementById('fl').style.display='';
});
}

function checkemail(email){
 var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i ;
 if(!filter.test(email)){alert("Indirizzo email non valido");}
 return (filter.test(email));
}


function invia(t1_2,t2_2,t3_2) {

var t1_2=t1_2;
var t2_2=t2_2;
var t3_2=t3_2;
document.formflash.mail.value=t2_2;
document.formflash.nome.value=t1_2;
document.formflash.mess.value=t3_2;
var risultato=true;
if(t1_2.replace(/ /g,'').length==0){alert("Inserisci tutti i dati"); risultato=false;}
else if(t2_2.replace(/ /g,'').length==0){alert("Inserisci tutti i dati"); risultato=false;}
else if(t3_2.replace(/ /g,'').length==0){alert("Inserisci tutti i dati"); risultato=false;}
else {risultato=checkemail(t2_2);}
if (risultato) {document.formflash.submit();}
}