   function deCode(theStr){
  theStr = theStr.replace(/\&\#(\d+)\;/g, function(p1,p2){return String.fromCharCode(p2)});
  return theStr;
}
function validEmail(emval)
{
return emval.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)
}
function bf_Validator(flightShoprequest)
{
if(flightShoprequest._originSelected.value=="")
{
alert("Pregasi inserire punto d'origine.");
flightShoprequest._originSelected.focus();
return(false);
}
if(flightShoprequest._destinationSelected.value=="")
{
alert("Pregasi inserire destinazione.");
flightShoprequest._destinationSelected.focus();
return(false);
}
_deptest = document.getElementById("datepicker1");
if(_deptest.value=="")
{
alert("Pregasi inserire data di partenza.");
_deptest.focus();
return(false);
}
for (i=0;i<flightShoprequest._tripType.length;i++)
{
      if (flightShoprequest._tripType[i].checked)
      {
             rbgroup_value =flightShoprequest._tripType[i].value;
      }
}
if(rbgroup_value!="OneWay")  {
_rettest = document.getElementById("datepicker2");
if(_rettest.value=="")
  {
   alert("Pregasi inserire data di ritorno.");
   _rettest.focus();
   return(false);
  }  }
return(true);
}
function wlorich() {

document.getElementById("wdforigin1").options.length=0

document.getElementById("wdforigin1").options[0]=new Option(deCode(" -- Selezionare la citt&#224; di partenza   --"), "", true, false)
document.getElementById("wdforigin1").options[1]=new Option("", "", false, false)
document.getElementById("wdforigin1").options[2]=new Option(" AMS - Amsterdam, Paesi Bassi", "Airport.AMS", false, false)
document.getElementById("wdforigin1").options[3]=new Option(" BCN - Barcellona, Spagna", "Airport.BCN", false, false)
document.getElementById("wdforigin1").options[4]=new Option(" CPH - Copenhagen, Danimarca", "Airport.CPH", false, false)
document.getElementById("wdforigin1").options[5]=new Option(" FRA - Frankoforte, Germania", "Airport.FRA", false, false)
document.getElementById("wdforigin1").options[6]=new Option(" HEL - Helsinki, Finlandia", "Airport.HEL", false, false)
document.getElementById("wdforigin1").options[7]=new Option(" JNB - Johannesburg- International, South Africa", "Airport.JNB", false, false)
document.getElementById("wdforigin1").options[8]=new Option(" LIS - Lisbona, Portogallo", "Airport.LIS", false, false)
document.getElementById("wdforigin1").options[9]=new Option(" LHR - Londra - Heathrow, Regno Unito", "Airport.LHR", false, false)
document.getElementById("wdforigin1").options[10]=new Option(" MAD - Madrid, Spagna", "Airport.MAD", false, false)
document.getElementById("wdforigin1").options[11]=new Option(" MAN - Manchester, Regno Unito", "Airport.MAN", false, false)
document.getElementById("wdforigin1").options[12]=new Option(" MRU - Mauritius - Seewoosagur International, Mauritius", "Airport.MRU", false, false)
document.getElementById("wdforigin1").options[13]=new Option(" MXP - Milano - Malpensa, Italia", "Airport.MXP", false, false)
document.getElementById("wdforigin1").options[14]=new Option(" VKO - Mosca - Vnukovo, Russia", "Airport.VKO", false, false)
document.getElementById("wdforigin1").options[15]=new Option(" NTE - Nantes, Francia", "Airport.NTE", false, false)
document.getElementById("wdforigin1").options[16]=new Option(" CDG - Parigi - Charles De Gaulle, Francia", "Airport.CDG", false, false)
document.getElementById("wdforigin1").options[17]=new Option(" FCO - Roma - Leonardo Da Vinci, Italia", "Airport.FCO", false, false)
document.getElementById("wdforigin1").options[18]=new Option(" SIN - Singapore - Changi International, Singapore", "Airport.SIN", false, false)
document.getElementById("wdforigin1").options[19]=new Option(" ARN - Stockholm - Arlanda, Sweden", "Airport.ARN", false, false)
document.getElementById("wdforigin1").options[20]=new Option(" TLS - Toulouse - Blagnac, France", "Airport.TLS", false, false)
document.getElementById("wdforigin1").options[21]=new Option(" VIE - Vienna, Austria", "Airport.VIE", false, false)
document.getElementById("wdforigin1").options[22]=new Option(" WAW - Varsavia, Polonia", "Airport.WAW", false, false)
document.getElementById("wdforigin1").options[23]=new Option(" ZRH - Zurigo, Svizzera", "Airport.ZRH", false, false)


document.getElementById("wdfdest1").options.length=0

}
function odesch() {

x=document.getElementById("wdforigin1").value;

document.getElementById("wdfdest1").options.length=0

	if (x == "Airport.SEZ")
	{
                document.getElementById("wdfdest1").options[0]=new Option(" -- Selezionare la Destinazione  --", "", true, false)
                document.getElementById("wdfdest1").options[1]=new Option("", "", false, false)
                document.getElementById("wdfdest1").options[2]=new Option(" AMS - Amsterdam, Paesi Bassi", "Airport.AMS", false, false)
                document.getElementById("wdfdest1").options[3]=new Option(" BCN - Barcellona, Spagna", "Airport.BCN", false, false)
                document.getElementById("wdfdest1").options[4]=new Option(" CPH - Copenhagen, Danimarca", "Airport.CPH", false, false)
                document.getElementById("wdfdest1").options[5]=new Option(" FRA - Frankoforte, Germania", "Airport.FRA", false, false)
                document.getElementById("wdfdest1").options[6]=new Option(" HEL - Helsinki, Finlandia", "Airport.HEL", false, false)
                document.getElementById("wdfdest1").options[7]=new Option(" JNB - Johannesburg- International, South Africa", "Airport.JNB", false, false)
                document.getElementById("wdfdest1").options[8]=new Option(" LIS - Lisbona, Portogallo", "Airport.LIS", false, false)
                document.getElementById("wdfdest1").options[9]=new Option(" LHR - Londra - Heathrow, Regno Unito", "Airport.LHR", false, false)
                document.getElementById("wdfdest1").options[10]=new Option(" MAD - Madrid, Spagna", "Airport.MAD", false, false)
                document.getElementById("wdfdest1").options[11]=new Option(" MAN - Manchester, Regno Unito", "Airport.MAN", false, false)
                document.getElementById("wdfdest1").options[12]=new Option(" MRU - Mauritius - Seewoosagur International, Mauritius", "Airport.MRU", false, false)
                document.getElementById("wdfdest1").options[13]=new Option(" MXP - Milano - Malpensa, Italia", "Airport.MXP", false, false)
                document.getElementById("wdfdest1").options[14]=new Option(" VKO - Mosca - Vnukovo, Russia", "Airport.VKO", false, false)
                document.getElementById("wdfdest1").options[15]=new Option(" NTE - Nantes, Francia", "Airport.NTE", false, false)
                document.getElementById("wdfdest1").options[16]=new Option(" CDG - Parigi - Charles De Gaulle, Francia", "Airport.CDG", false, false)
                document.getElementById("wdfdest1").options[17]=new Option(" FCO - Roma - Leonardo Da Vinci, Italia", "Airport.FCO", false, false)
                document.getElementById("wdfdest1").options[18]=new Option(" SIN - Singapore - Changi International, Singapore", "Airport.SIN", false, false)
                document.getElementById("wdfdest1").options[19]=new Option(" ARN - Stockholm - Arlanda, Sweden", "Airport.ARN", false, false)
                document.getElementById("wdfdest1").options[20]=new Option(" TLS - Toulouse - Blagnac, France", "Airport.TLS", false, false)
                document.getElementById("wdfdest1").options[21]=new Option(" VIE - Vienna, Austria", "Airport.VIE", false, false)
                document.getElementById("wdfdest1").options[22]=new Option(" WAW - Varsavia, Polonia", "Airport.WAW", false, false)
                document.getElementById("wdfdest1").options[23]=new Option(" ZRH - Zurigo - Zurigo, Svizzera", "Airport.ZRH", false, false)
	}
	else if (x == "Airport.LHR") {
                document.getElementById("wdfdest1").options[0]=new Option(" -- Selezionare la Destinazione  --", "", true, false)
                document.getElementById("wdfdest1").options[1]=new Option("", "", false, false)
                document.getElementById("wdfdest1").options[2]=new Option(" SEZ - Mahe Island - Seychelles International, Seychelles", "Airport.SEZ", false, false)
                document.getElementById("wdfdest1").options[3]=new Option(" ZRH - Zurigo - Zurigo, Svizzera", "Airport.ZRH", false, false)
        }
        else {        document.getElementById("wdfdest1").options[0]=new Option(" SEZ - Mahe Island - Seychelles International, Seychelles", "Airport.SEZ", true, false)

 }

}
function ddesch() {

x=document.getElementById("wdfdest1").value;

t=document.getElementById("wdforigin1").value;

document.getElementById("wdforigin1").options.length=0;

	if (x == "Airport.SEZ")
	{
            if (t == "Airport.LHR" ) {
                document.getElementById("wdforigin1").options[0]=new Option(" LHR - Londra - Heathrow, Regno Unito", "Airport.LHR", true, false)
            }
            else {
                document.getElementById("wdfdest1").options[0]=new Option(" -- Selezionare la Destinazione  --", "", true, false)
                document.getElementById("wdfdest1").options[1]=new Option("", "", false, false)
            }
	}
	else if (x == "Airport.ZRH")
	{
            if (t == "Airport.LHR" ) {
                document.getElementById("wdforigin1").options[0]=new Option(" LHR - Londra - Heathrow, Regno Unito", "Airport.LHR", true, false)
            }
            else {
                document.getElementById("wdfdest1").options[0]=new Option(" -- Selezionare la Destinazione  --", "", true, false)
                document.getElementById("wdfdest1").options[1]=new Option("", "", false, false)
                document.getElementById("wdfdest1").options[2]=new Option(" AMS - Amsterdam, Paesi Bassi", "Airport.AMS", false, false)
                document.getElementById("wdfdest1").options[3]=new Option(" BCN - Barcellona, Spagna", "Airport.BCN", false, false)
                document.getElementById("wdfdest1").options[4]=new Option(" CPH - Copenhagen, Danimarca", "Airport.CPH", false, false)
                document.getElementById("wdfdest1").options[5]=new Option(" FRA - Frankoforte, Germania", "Airport.FRA", false, false)
                document.getElementById("wdfdest1").options[6]=new Option(" HEL - Helsinki, Finlandia", "Airport.HEL", false, false)
                document.getElementById("wdfdest1").options[7]=new Option(" JNB - Johannesburg- International, South Africa", "Airport.JNB", false, false)
                document.getElementById("wdfdest1").options[8]=new Option(" LIS - Lisbona, Portogallo", "Airport.LIS", false, false)
                document.getElementById("wdfdest1").options[9]=new Option(" LHR - Londra - Heathrow, Regno Unito", "Airport.LHR", false, false)
                document.getElementById("wdfdest1").options[10]=new Option(" MAD - Madrid, Spagna", "Airport.MAD", false, false)
                document.getElementById("wdfdest1").options[11]=new Option(" MAN - Manchester, Regno Unito", "Airport.MAN", false, false)
                document.getElementById("wdfdest1").options[12]=new Option(" MRU - Mauritius - Seewoosagur International, Mauritius", "Airport.MRU", false, false)
                document.getElementById("wdfdest1").options[13]=new Option(" MXP - Milano - Malpensa, Italia", "Airport.MXP", false, false)
                document.getElementById("wdfdest1").options[14]=new Option(" VKO - Mosca - Vnukovo, Russia", "Airport.VKO", false, false)
                document.getElementById("wdfdest1").options[15]=new Option(" NTE - Nantes, Francia", "Airport.NTE", false, false)
                document.getElementById("wdfdest1").options[16]=new Option(" CDG - Parigi - Charles De Gaulle, Francia", "Airport.CDG", false, false)
                document.getElementById("wdfdest1").options[17]=new Option(" FCO - Roma - Leonardo Da Vinci, Italia", "Airport.FCO", false, false)
                document.getElementById("wdfdest1").options[18]=new Option(" SIN - Singapore - Changi International, Singapore", "Airport.SIN", false, false)
                document.getElementById("wdfdest1").options[19]=new Option(" ARN - Stockholm - Arlanda, Sweden", "Airport.ARN", false, false)
                document.getElementById("wdfdest1").options[20]=new Option(" TLS - Toulouse - Blagnac, France", "Airport.TLS", false, false)
                document.getElementById("wdfdest1").options[21]=new Option(" VIE - Vienna, Austria", "Airport.VIE", false, false)
                document.getElementById("wdfdest1").options[22]=new Option(" WAW - Varsavia, Polonia", "Airport.WAW", false, false)
                document.getElementById("wdfdest1").options[23]=new Option(" ZRH - Zurigo - Zurigo, Svizzera", "Airport.ZRH", false, false)
            }
	}
	else {
        document.getElementById("wdforigin1").options[0]=new Option(" SEZ - Mahe Island - Seychelles International, Seychelles", "Airport.SEZ", true, false)

 }

}

function dodesch() {

x=document.getElementById("wdforigin").value;

document.getElementById("wdfdest").options.length=0

	if (x == "16")
	{
                document.getElementById("wdfdest").options[0]=new Option(" Praslin", "18", false, false)

	}

        else {        document.getElementById("wdfdest").options[0]=new Option(" Mahe", "16", true, false)

 }

}

function dddesch() {

x=document.getElementById("wdfdest").value;

document.getElementById("wdforigin").options.length=0

	if (x == "18")
	{
         document.getElementById("wdforigin").options[0]=new Option(" Mahe", "16", true, false)
	}
	else {
        document.getElementById("wdforigin").options[0]=new Option(" Praslin", "18", false, false)

 }

}
