<!--
defaultStatus = ''
//precarica le immagini della mappa
var imagenames=new Array( 'Hotel_Alghero_Hotels_Alghero/bantine_sale.jpg','Hotel_Alghero_Hotels_Alghero/escala_del_cabirol.jpg','Hotel_Alghero_Hotels_Alghero/fertilia.jpg','Hotel_Alghero_Hotels_Alghero/foradada.jpg','Hotel_Alghero_Hotels_Alghero/grotte_di_nettuno.jpg','Hotel_Alghero_Hotels_Alghero/ingresso-grotta-verde.jpg','Hotel_Alghero_Hotels_Alghero/lago-baratz.jpg','Hotel_Alghero_Hotels_Alghero/palmavera.jpg','Hotel_Alghero_Hotels_Alghero/porticciolo.jpg','Hotel_Alghero_Hotels_Alghero/porto_conte.jpg','Hotel_Alghero_Hotels_Alghero/porto-ferro.jpg','Hotel_Alghero_Hotels_Alghero/punta-cristallo.jpg','Hotel_Alghero_Hotels_Alghero/scorcio-su-capo-caccia.jpg','Hotel_Alghero_Hotels_Alghero/spiaggia-bombarde.jpg','Hotel_Alghero_Hotels_Alghero/spiaggia-lazzaretto.jpg','Hotel_Alghero_Hotels_Alghero/Spiaggia-Maria-Pia.jpg','Hotel_Alghero_Hotels_Alghero/spiaggia-puntanegra.jpg','Hotel_Alghero_Hotels_Alghero/torre-bianca.jpg');


var yposition=185;             //POSITION OF LOAD BAR FROM TOP OF WINDOW, IN PIXELS
var loadedcolor='#EAC535' ;    // PROGRESS BAR COLOR
var unloadedcolor='#FFFFCC';   // BGCOLOR OF UNLOADED AREA
var barheight=15;              // HEIGHT OF PROGRESS BAR IN PIXELS (MIN 25)
var barwidth=200;              // WIDTH OF THE BAR IN PIXELS  
var bordercolor='#EAC535';     // COLOR OF THE BORDER


var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
var IE4 = (document.all)? true : false;
var NS6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var imagesdone=false;
var blocksize=barwidth/(imagenames.length);
barheight=Math.max(barheight,25);
var loaded=0, perouter, perdone, images=new Array();
var txt=(NS4)?'<layer name="perouter" bgcolor="'+bordercolor+'" visibility="hide">' : '<div id="perouter" style="position:absolute; visibility:hidden; background-color:'+bordercolor+'">';
txt+='<table cellpadding="0" cellspacing="1" border="0"><tr><td width="'+barwidth+'" height="'+barheight+'" valign="center">';
if(NS4)txt+='<ilayer width="100%" height="100%"><layer width="100%" height="100%" bgcolor="'+unloadedcolor+'" top="0" left="0">';
txt+='<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" width="'+barwidth+'" height="'+barheight+'" bgcolor="'+unloadedcolor+'"><center><font color="'+loadedcolor+'" size="2" face="sans-serif">Carico le foto della mappa...</font></center></td></tr></table>';
if(NS4) txt+='</layer>';
txt+=(NS4)? '<layer name="perdone" width="100%" height="'+barheight+'" bgcolor="'+loadedcolor+'" top="0" left="0">' : '<div id="perdone" style="position:absolute; top:1px; left:1px; width:'+barwidth+'px; height:'+barheight+'px; background-color:'+loadedcolor+'; z-index:100">';
txt+='<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" width="'+barwidth+'" height="'+barheight+'" bgcolor="'+loadedcolor+'"><center><font color="'+unloadedcolor+'" size="2" face="sans-serif">Carico le foto della mappa...</font></center></td></tr></table>';
txt+=(NS4)? '</layer></ilayer>' : '</div>';
txt+='</td></tr></table>';
txt+=(NS4)?'</layer>' : '</div>';
document.write(txt);
function loadimages(){
if(NS4){
perouter=document.perouter;
perdone=document.perouter.document.layers[0].document.perdone;
}
if(NS6){
perouter=document.getElementById('perouter');
perdone=document.getElementById('perdone');
}
if(IE4){
perouter=document.all.perouter;
perdone=document.all.perdone;
}
cliplayer(perdone,0,0,barheight,0);
window.onresize=setouterpos;
setouterpos();
for(n=0;n<imagenames.length;n++){
images[n]=new Image();
images[n].src=imagenames[n];
setTimeout('checkload('+n+')' ,n*100);
}}
function setouterpos(){
var ww=(IE4)? document.body.clientWidth : window.innerWidth;
var x=(ww-barwidth)/2;
if(NS4){
perouter.moveTo(x,yposition);
perouter.visibility="show";
}
if(IE4||NS6){
perouter.style.left=x+'px';
perouter.style.top=yposition+'px';
perouter.style.visibility="visible";
}}
function dispbars(){
loaded++;
cliplayer(perdone, 0, blocksize*loaded, barheight, 0);
if(loaded>=imagenames.length)setTimeout('hideperouter()', 800);
}
function checkload(index){
(images[index].complete)? dispbars() : setTimeout('checkload('+index+')', 100);
}
function hideperouter(){
(NS4)? perouter.visibility="hide" : perouter.style.visibility="hidden";
imagesdone=true;
}
function cliplayer(layer, ct, cr, cb, cl){
if(NS4){
layer.clip.left=cl;
layer.clip.top=ct;
layer.clip.right=cr;
layer.clip.bottom=cb;
}
if(IE4||NS6)layer.style.clip='rect('+ct+' '+cr+' '+cb+' '+cl+')';
}
window.onload=loadimages;

//----------------------------------------tiene sotto controllo gli spostamenti del mouse determinandone le cordinate del puntatore
var nn = document.layers ? true : false; 
var ie = document.all ? true : false; 
var xPos = 0, yPos = 0;
nn?window.captureEvents(Event.MOUSEMOVE):null; 
nn?window.onmousemove=Mostra:document.onmousemove=Mostra; 

function Mostra(Movimento_puntatore) 
   { 
   if (ie) 
      { 
      xPos=window.event.screenX; 
      yPos=window.event.screenY; 
      } 
      else 
      { 
      xPos=Movimento_puntatore.screenX; 
      yPos=Movimento_puntatore.screenY; 
      }
   }
//------------------------------------crea le popup immagini della mappa
   function finestra (img,title,w,h)
   {
   Fin=window.open('','Fin','left='+xPos+',screenX='+xPos+',top='+yPos+',screenY='+yPos+',width='+w+',height='+h+'');
   Fin.window.moveTo(xPos,yPos);
   Fin.window.resizeTo(w,h);
   Fin.window.focus();   
   Fin.document.open();
   Fin.document.write("<HTML><HEAD><title>");
   Fin.document.write(title);
   Fin.document.write("</title></HEAD>");
   Fin.document.write("<body topmargin='0' leftmargin='0' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'>");
   Fin.document.write("<img src=\""+img+"\" onMouseOver=\"opener.window.status='"+title+"';return false\" onMouseOut=\"opener.window.status='';return false\" alt=\""+title+"\">");
   Fin.document.write("</BODY></HTML>");
   Fin.document.close();
   }
//-----------------------------crea la popup per poter stampare la mappa
   function stampa_mappa()
   {
   PopMap=window.open('','PopMap','width=556, height=485,top=0,left=0');
   PopMap.document.open();
   PopMap.document.write("<HTML><HEAD><title>Territoire d'Alghero</title></HEAD>");
   PopMap.document.write("<body onLoad='self.print();self.close()' onDragStart='return false' onSelectStart='return false' onContextMenu='return false' topmargin='0' leftmargin='0'>");
   PopMap.document.write("<div align='center'>");
   PopMap.document.write("<center>");
   PopMap.document.write("<table border='0' width='556' cellspacing='0' cellpadding='0' height='485'>");
   PopMap.document.write("<tr><td width='556' height='485' align='center'><p align='left'><img border='0' src='Hotel_Alghero_Hotels_Alghero/Hotel_Alghero_Hotels_Alghero.gif' width='556' height='485'></p></td></tr>");
   PopMap.document.write("</table></center></div></body></html>");
   PopMap.document.close();
   }
//------------------------------------email antispam----------------------
function DisplayMail(Server, Login, Display)
{
if((Display.length == 0) || (Display.indexOf('@')+1))
{
document.write("<a class='m2' href=" + " 'mai" + "lto:" + Login + "@" + Server + "'>" +Login+ "@" +Server+ "</a>");}
else 
{
document.write("<a class='m2' href=" + " 'mai" + "lto:" + Login + "@" + Server +"'><img border='0' src='sardaigne_bed_and_breakfast_alghero/mailer.gif' width='34' height='21'>" +Display+ "</a>");}
}
//----------------------------------link utili--------------------
function link_utili()
{      
      document.write("<div id=bloccobox style='display:none'>");
      document.write("<p class='box'>");
      document.write("<span class='sardaigne_bed_and_breakfast_alghero'>Les avions...</span><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.ryanair.com' target='_blank'>&#187 Ryanair</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.germanwings.com' target='_blank'>&#187 Germanwings</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.airberlin.com' target='_blank'>&#187 Air Berlin</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.hlx.com' target='_blank'>&#187 Hlx</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.alitalia.it' target='_blank'>&#187 Alitalia</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.meridiana.it' target='_blank'>&#187 Meridiana </a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.flyairone.it' target='_blank'>&#187 Air One</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.aireurope.it' target='_blank'>&#187 Aireurope</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.volare-airlines.com' target='_blank'>&#187 Volare</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.airdolomiti.it' target='_blank'>&#187 Airdolomiti</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.alpieagles.com' target='_blank'>&#187 Alpieagles</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.easyjet.com' target='_blank'>&#187 Easyjet</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.iberia.it' target='_blank'>&#187 Iberia</a><br>");      
      document.write("<br><span class='sardaigne_bed_and_breakfast_alghero'>Les bateaux...</span><br>")
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.tirrenia.it' target='_blank'>&#187 Tirrenia</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.mobylines.it' target='_blank'>&#187 Moby Lines</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.gnv.it' target='_blank'>&#187 Grimaldi</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.corsicaferries.com' target='_blank'>&#187 Corsica ferries</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.sardiniaferries.com' target='_blank'>&#187 Sardinia ferries</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.lineadeigolfi.it' target='_blank'>&#187 Linea dei golfi</a><br>");
      document.write("<br><span class='sardaigne_bed_and_breakfast_alghero'>Location de voitures...</span><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.autonoleggiosardinya.it' target='_blank'>Autonoleggiosardinya</a><br>");
      document.write("<br><span class='sardaigne_bed_and_breakfast_alghero'>Les treins...</span><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.trenitalia.com' target='_blank'>&#187 Trenitalia</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.ferroviesardegna.it' target='_blank'>&#187 Ferr.Sardegna</a><br>");
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.ferroviemeridionalisarde.it' target='_blank'>&#187 Ferr.Mer.Sarde</a><br>");
      document.write("<br><span class='sardaigne_bed_and_breakfast_alghero'>Les Autobus...</span><br>");      
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.arst.sardegna.it' target='_blank'>&#187 Arst</a><br>"); 
      document.write("<a class='Sardaigne_B_and_B_Alghero_Sardaigne_Bed_and_breakfast_Alghero' href='http://www.turmotravel.it' target='_blank'>&#187 Turmotravel</a><br>");     
      document.write("</p>");
      document.write("</div>");

}
//----------------------------------bloccobox menù-----------------
function toggle(id){
   if (document.all){
     if(document.all[id].style.display == 'none'){
       document.all[id].style.display = '';
     } else {
       document.all[id].style.display = 'none';
     }
  return false;
   } else if (document.getElementById){
     if(document.getElementById(id).style.display == 'none'){
       document.getElementById(id).style.display = 'block';
     } else {
       document.getElementById(id).style.display = 'none';
     }
  return false;
   }
 }
//------------------------------funzione controllo input form-----------------------
function formemail()
{
document.write("<div id='bloccoform' style='display:none'>");
document.write("<form method='POST' name='modulo' action='formmail.php'>");
document.write("<INPUT TYPE='hidden' NAME='Richiesta informazioni inviata dal sito' VALUE='www.sardegna-bed-and-breakfast-alghero.com'>");
document.write("<table border='0' cellpadding='0' cellspacing='0' style='border: 3px solid #EAC535' width='430'>");
document.write("<tr>");
document.write("<td width='430' style='background-color: #F9F49F' colspan='2'><h3 align='center'><font color='#B77E03'>Information et réservations</font></h3></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='430' style='background-color: #F9F49F' colspan='2'><div align='right'><font color='#FF3300'>*  voix obligatoires</font></div></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Prénom et Nom:*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='NOME' onkeypress='return SoloLettere(event);' size='38' maxlength='50' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Votre Ville:</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='CITTA' onkeypress='return SoloLettere(event);' size='38' maxlength='50' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Votre Email:*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='EMAIL' size='38' maxlength='50' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Répéter Email:*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='CONFERMA' size='38' maxlength='50' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Votre téléphone:</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='TELEFONO' onkeypress='return SoloNumeri(event);' size='20' maxlength='20' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'><font color='#B77E03'> nnn/nnn </font></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Date d'arrivée :*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='DATA_ARRIVO' onkeypress='return SoloNumeri(event);' size='10' maxlength='10' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'><font color='#B77E03'> jj/mm/aaaa </font></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Date de départ:*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='DATA_PARTENZA' onkeypress='return SoloNumeri(event);' size='10' maxlength='10' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'><font color='#B77E03'> jj/mm/aaaa </font></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Nombre Personnes:*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='NUMERO_PERSONE' onkeypress='return SoloNumeri(event);' size='2' maxlength='2' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'><font color='#B77E03'> n - nn</font></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Âge Personnes:*</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='text' name='ETA_PERSONE' onkeypress='return SoloNumeri(event);' size='29' maxlength='29' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'><font color='#B77E03'> nn/nn/nn </font></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'><p>Message:</p></td>");
document.write("<td width='280' style='background-color: #F9F49F'><textarea rows='10' name='MESSAGGIO' cols='32'></textarea></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='150' style='background-color: #F9F49F'></td>");
document.write("<td width='280' style='background-color: #F9F49F'><input type='button' value='Send' onClick='Modulo();'> <input type='reset' value='Clear'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='430' style='background-color: #F9F49F' colspan='2'>");
document.write("<br>");
document.write("<span class='chambre_d_hote_alghero_chambres_d_hotes_alghero'>Ouverte du mois d'avril à octobre</span><br>"); 
document.write("<span class='sardaigne_bed_and_breakfast_alghero'>Pour renseignements et réservation écrivez:</span><br>");
document.write("<span class='chambre_d_hote_alghero_chambres_d_hotes_alghero'>Villa Grazia C.P. 304 I-07041 Alghero (SS) - Sardegna</span><br>"); 
document.write("<span class='sardaigne_bed_and_breakfast_alghero'>Ou téléphonez dans la maison:</span>");
document.write("<span class='chambre_d_hote_alghero_chambres_d_hotes_alghero'>+39 079.980.276</span><br>");
document.write("<span class='sardaigne_bed_and_breakfast_alghero'>Fax:</span>");
document.write("<span class='chambre_d_hote_alghero_chambres_d_hotes_alghero'>+39 079.980.276</span><br>");
document.write("<span class='sardaigne_bed_and_breakfast_alghero'>Mobile:</span>");
document.write("<span class='chambre_d_hote_alghero_chambres_d_hotes_alghero'>+39 338.572.1188</span><br>");
document.write("<span class='sardaigne_bed_and_breakfast_alghero'>Email:</span>");
document.write("<script language=\"Javascript\">DisplayMail('email.it',' villagrazia.alghero','');</script>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</form>");
document.write("</div>");
}
//------------------------------funzione controllo input form-----------------------
function Modulo(){

    var now = new Date();
	var giorno = now.getDate();
	var mese = now.getMonth() + 1;
	var anno = now.getFullYear();
	var annoprossimo = anno+1;

	if(giorno<10) giorno = "0"+giorno; //aggiunge lo 0 ai giorni che possono essere scritti con un solo numero
	if(mese<10) mese = "0"+mese; //aggiunge lo 0 ai mesi che possono essere scritti con un solo numero
    var DATA_ODIERNA = giorno + "/" + mese + "/" + anno + " ";
    //document.write(DATA_ODIERNA);

  var EMAIL = document.modulo.EMAIL.value; 
  var email_reg_exp = /^([a-zA-Z0-9_\.\-]{2,})+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
  
  var ETAPERSONE = document.modulo.ETA_PERSONE.value;
  
  var ETAPERSONE1_reg_exp = /^([0-9]{2,2})$/;
  var ETAPERSONE2_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE3_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE4_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE5_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE6_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE7_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE8_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE9_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;
  var ETAPERSONE10_reg_exp = /^([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})+\/([0-9]{2,2})$/;


        if ((document.modulo.NOME.value == "") || (document.modulo.NOME.value == "undefined")) {
           alert("Insérer votre nome et prénom");
           document.modulo.NOME.focus();
           return false;
        }
        else if (!email_reg_exp.test(EMAIL) || (EMAIL == "") || (EMAIL == "undefined")) {
           alert("Insérer une adresse email valide");
           document.modulo.EMAIL.value = "";
           document.modulo.EMAIL.select();
           document.modulo.EMAIL.focus();
           return false;
        }
        else if ((document.modulo.CONFERMA.value == "") || (document.modulo.CONFERMA.value == "undefined")) {
           alert("L'adresse email de champ Répéter Email est obligatoire.");
           document.modulo.CONFERMA.focus();
           return false;
        }
        else if (document.modulo.EMAIL.value != document.modulo.CONFERMA.value) {
           alert("L'adresse email confirmée n’est pas celle choisie, vérifier");
           document.modulo.CONFERMA.value = "";
           document.modulo.CONFERMA.focus();
           return false;
        }
//-------------Effettua il controllo sul campo DATA di ARRIVO-------------------//
        else if (document.modulo.DATA_ARRIVO.value.substring(2,3) != "/" ||
                 document.modulo.DATA_ARRIVO.value.substring(5,6) != "/" ||
           isNaN(document.modulo.DATA_ARRIVO.value.substring(0,2)) ||
           isNaN(document.modulo.DATA_ARRIVO.value.substring(3,5)) ||
           isNaN(document.modulo.DATA_ARRIVO.value.substring(6,10))) {
           alert("Insérer la date d’arrivée en modalité jj/mm/aaaa");
                 document.modulo.DATA_ARRIVO.value = "";
                 document.modulo.DATA_ARRIVO.focus();
                 return false;
        }
        else if (document.modulo.DATA_ARRIVO.value.substring(0,2) > 31) {
           alert("Le jour d’arrivée n’est pas correct");
           document.modulo.DATA_ARRIVO.select();
           return false;
        }
        else if (document.modulo.DATA_ARRIVO.value.substring(3,5) > 12) {
           alert("Le mois de la date d’arrivée, n’est pas correct");
           document.modulo.DATA_ARRIVO.select();
           return false;
        }
        else if ((document.modulo.DATA_ARRIVO.value.substring(6,10) < anno) || (document.modulo.DATA_ARRIVO.value.substring(6,10) > annoprossimo)) {
           alert("L’année de la date d’arrivée ne peut être pas mineure de "+anno+" ni majeure de "+annoprossimo+".");
           document.modulo.DATA_ARRIVO.select();
           return false;
        }
//------------------- fa il confronto con la data di arrivo immessa dall'utente e la data odierna
        
        else if ((document.modulo.DATA_ARRIVO.value.substring(0,2) <= giorno) && 
                 (document.modulo.DATA_ARRIVO.value.substring(3,5) == mese) && 
                 (document.modulo.DATA_ARRIVO.value.substring(6,10) == anno)) {
           alert("Le jour de la date d’arrivée n’est pas correct; aujourd’hui il est "+ DATA_ODIERNA +".");
           document.modulo.DATA_ARRIVO.select();
           return false;
        }
        else if ((document.modulo.DATA_ARRIVO.value.substring(3,5) < mese) && 
                 (document.modulo.DATA_ARRIVO.value.substring(6,10) == anno)) {
           alert("Le mois de la date d’arrivée n’est pas correct; aujourd’hui il est "+ DATA_ODIERNA +".");
           document.modulo.DATA_ARRIVO.select();
           return false;
        }

//--------------------fine confronto con la data di arrivo immessa e quella odierna
        
//------------Effettua il controllo sul campo DATA di PARTENZA-----------------// 
        else if (document.modulo.DATA_PARTENZA.value.substring(2,3) != "/" ||
                 document.modulo.DATA_PARTENZA.value.substring(5,6) != "/" ||
           isNaN(document.modulo.DATA_PARTENZA.value.substring(0,2)) ||
           isNaN(document.modulo.DATA_PARTENZA.value.substring(3,5)) ||
           isNaN(document.modulo.DATA_PARTENZA.value.substring(6,10))) {
           alert("Insérer la date de départ en modalité jj/mm/aaaa");
                 document.modulo.DATA_PARTENZA.value = "";
                 document.modulo.DATA_PARTENZA.focus();
                 return false;
        }
        else if (document.modulo.DATA_PARTENZA.value.substring(0,2) > 31) {
           alert("Le jour de la date de départ n’est pas correct");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if (document.modulo.DATA_PARTENZA.value.substring(3,5) > 12) {
           alert("Le mois de la date de départ n’est pas correct");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if ((document.modulo.DATA_PARTENZA.value.substring(6,10) < anno) || (document.modulo.DATA_PARTENZA.value.substring(6,10) > annoprossimo)) {
           alert("L’année de la date de départ ne peut être pas mineure de "+anno+" ni majeure de "+annoprossimo+".");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if (document.modulo.DATA_ARRIVO.value == document.modulo.DATA_PARTENZA.value) {
           alert("La date d’arrivée et la date de départ sont les mêmes: vérifier");
           document.modulo.DATA_ARRIVO.focus();
           return false;
        }
        else if ((document.modulo.DATA_PARTENZA.value.substring(0,2) <= giorno) && 
                 (document.modulo.DATA_PARTENZA.value.substring(3,5) == mese) && 
                 (document.modulo.DATA_PARTENZA.value.substring(6,10) == anno)) {
           alert("Le jour de la date de départ n’est pas correct: aujourd’hui il est "+ DATA_ODIERNA +".");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if ((document.modulo.DATA_PARTENZA.value.substring(3,5) < mese) && 
                 (document.modulo.DATA_PARTENZA.value.substring(6,10) == anno)) {
           alert("Le mois de la date de départ n’est pas correct; aujourd’hui il est "+ DATA_ODIERNA +".");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if((document.modulo.DATA_PARTENZA.value.substring(0,2) < document.modulo.DATA_ARRIVO.value.substring(0,2)) &&
                (document.modulo.DATA_PARTENZA.value.substring(3,5) == document.modulo.DATA_ARRIVO.value.substring(3,5)) &&
                (document.modulo.DATA_PARTENZA.value.substring(6,10) == document.modulo.DATA_ARRIVO.value.substring(6,10))) {
           alert("Le jour de la date de départ est antécédent au jour de la date d’arrivée: vérifier");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if((document.modulo.DATA_PARTENZA.value.substring(3,5) < document.modulo.DATA_ARRIVO.value.substring(3,5)) &&
                (document.modulo.DATA_PARTENZA.value.substring(6,10) == document.modulo.DATA_ARRIVO.value.substring(6,10))) {
           alert("Le mois de la date de départ est antécédent au mois de la date d’arrivée: vérifier");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
//----------------fine controllo date arrivo e partenza -------------//
        
        else if ((document.modulo.NUMERO_PERSONE.value == "")) {
           alert("Insérer le numéro des personnes");
           document.modulo.NUMERO_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value > 10)) {
           alert("Nous regrettons de ne pouvoir accueillir cette quantité de personnes");
           document.modulo.NUMERO_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.ETA_PERSONE.value == "")) {
           alert("Insérer l’âge des personnes");
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        
        else if ((document.modulo.NUMERO_PERSONE.value == "1") && (!ETAPERSONE1_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge de la personne en modalité  ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "2") && (!ETAPERSONE2_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des  2 personnes en modalité  ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "3") && (!ETAPERSONE3_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 3 personnes en modalité  ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "4") && (!ETAPERSONE4_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 4 personnes en modalité  ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "5") && (!ETAPERSONE5_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 5 personnes en modalité  ââ/ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "6") && (!ETAPERSONE6_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 6 personnes en modalité  ââ/ââ/ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "7") && (!ETAPERSONE7_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 7 personnes en modalité  ââ/ââ/ââ/ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "8") && (!ETAPERSONE8_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 8 personnes en modalité  ââ/ââ/ââ/ââ/ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "9") && (!ETAPERSONE9_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 9 personnes en modalité  ââ/ââ/ââ/ââ/ââ/ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value == "10") && (!ETAPERSONE10_reg_exp.test(ETAPERSONE))) {
           alert("Insérer l’âge des 10 personnes en modalité  ââ/ââ/ââ/ââ/ââ/ââ/ââ/ââ/ââ/ââ");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }

   else {
           document.modulo.action = "formmail.php";
           document.modulo.submit();
        }
  }
//-----------------------------funzione per inserire solo numeri---------------//
function SoloNumeri(numeri) {
numeri = (numeri) ? numeri : event;
var charCode = (numeri.charCode) ? numeri.charCode : ((numeri.keyCode) ? numeri.keyCode : ((numeri.which) ? numeri.which : 0));
if (charCode > 31 && (charCode < 47 || charCode > 57))
{
alert("On peut insérer seulement des numéros séparés par /");
document.focus();
return false;
}
return true;
}
//----------------------------inserire solo lettere---------------------------//  
function SoloLettere(lettere) {
numeri = (lettere) ? lettere : event;
var charCode = (lettere.charCode) ? lettere.charCode : ((lettere.keyCode) ? lettere.keyCode : ((lettere.which) ? lettere.which : 0));
if (charCode > 32 && (charCode < 65 || charCode > 90 && charCode < 97 || charCode > 122 && charCode < 128 || charCode > 154 && charCode < 160 || charCode > 165 && charCode < 181 || charCode > 183 && charCode < 224 || charCode > 237))
{
alert("On peut insérer seulement des lettres");
document.focus();
return false;
}
return true;
}

//--> 













