<!--//

			var CurrentArrAirRes = "";
			var currentDepAir = "";
			var currentCountry = "";

			/*
				Countries and their Airports
			*/
			var arCountryAirports = new Array();
			var arAirportResorts = new Array();
			var arAirportRoutes = new  Array();

			arCountryAirports['CYPRUS'] = "" + "LCA,Larnaca|PFO,Paphos|";
arCountryAirports['EGYPT'] = "" + "SSH,Sharm El Sheikh|";
arCountryAirports['GREECE'] = "" + "CFU,Corfu|CHQ,Crete - Chania|HER,Crete - Heraklion|KLX,Kalamata|KVA,Kavala|EFL,Kefalonia|KGS,Kos|JMK,Mykonos|MJT,Mytilini|PVK,Preveza - Aktion|RHO,Rhodes|SMI,Samos|JTR,Santorini|JSI,Skiathos|ZTH,Zante|";
arCountryAirports['TURKEY'] = "" + "BJV,Bodrum|DLM,Dalaman|";


			/*
				Airports and the Resorts they service
			*/
			arAirportResorts['AYT'] = "" + "";
arAirportResorts['BJV'] = "" + "H9,Bodrum|I0,Gumbet|EC,Ortakent|ED,Turgutreis|";
arAirportResorts['BOJ'] = "" + "";
arAirportResorts['CFU'] = "" + "CY,Aghios Gordios|J7,Aghios Ioannis  & Moraitika|K3,Dassia|FP,Gaios|K8,Ipsos|K9,Kavos|HE,Nissaki|L8,Paleokastritsa|M0,Sidari|";
arAirportResorts['CHQ'] = "" + "DP,Georgioupolis|DN,Gulf Of Chania|DO,Kalives|DQ,Paleochora|";
arAirportResorts['HER'] = "" + "DW,Aghios Nikolaos|DV,Bali|1A,Elounda|1E,Hersonissos|DX,Makriyalos|1I,Malia|DR,Rethymnon|1L,Stalis|";
arAirportResorts['DLM'] = "" + ",Cruises|R5,Fethiye|R6,Icmeler|R7,Marmaris|R8,Olu Deniz|EF,Turunc|";
arAirportResorts['FAO'] = "" + "T6,Albufeira|T8,Alvor|Y3,Vilamoura|";
arAirportResorts['LPA'] = "" + "4F,Meloneras|4I,Playa Del Ingles|4G,Puerto De Mogan|4J,Puerto Rico|";
arAirportResorts['HRG'] = "" + "";
arAirportResorts['KLX'] = "" + "EY,Chrani Village|EZ,Finikounda Resort|EX,Stoupa Village|";
arAirportResorts['KVA'] = "" + "EH,Limenaria|EG,Potos|EI,Thassos Town|";
arAirportResorts['EFL'] = "" + "S7,Lassi|CZ,Lourdas|T0,Scala|";
arAirportResorts['KGS'] = "" + "3D,Kardamena|3E,Kefalos|3G,Kos Town|DY,Tingaki|";
arAirportResorts['ACE'] = "" + "9O,Costa Teguise|GY,Matagorda|9S,Playa Blanca|9V,Playa de los Pocillos|9U,Puerto Del Carmen|";
arAirportResorts['LCA'] = "" + "3Q,Ayia Napa|3S,Larnaca|3T,Limassol|3W,Protaras|";
arAirportResorts['LXR'] = "" + "";
arAirportResorts['PMI'] = "" + "8L,Alcudia|8V,Cala d'Or|0M,Magaluf/Palma Nova|";
arAirportResorts['JMK'] = "" + "FF,Aghia Anna - Naxos Island|FH,Aghios Georgios - Naxos Isl.|2F,Mykonos Town|FD,Naoussa - Paros Island|FG,Naxos Town - Naxos Island|2G,Ornos|FE,Parikia - Paros Island|DZ,Platyialos|";
arAirportResorts['MJT'] = "" + "EJ,Anaxos|EL,Molyvos|EK,Petra|";
arAirportResorts['PFO'] = "" + "8F,Paphos|";
arAirportResorts['PVK'] = "" + "DD,Lygia|DF,Nidri|DH,Parga Village|DG,Sivota Village|";
arAirportResorts['RHO'] = "" + "DL,Afandou|P7,Faliraki|DJ,Haraki|P9,Ixia & Trianda|Q0,Kalathos|Q4,Lindos|Q5,Pefkos|Q7,Rhodes Town|DK,Stegna|DM,Symi Town - Symi Island|";
arAirportResorts['SMI'] = "" + "EM,Kambos|Z2,Pythagorion|Z4,Samos Town|";
arAirportResorts['JTR'] = "" + "2V,Firostefani|2Y,Kamari|3B,Perissa|";
arAirportResorts['SSH'] = "" + "AF,Sharm El Sheikh|";
arAirportResorts['JSI'] = "" + "EQ,Aghia Paraskevi|EN,Alonissos Resort|ER,Kolios|2Q,Koukounaries|ET,Pelion|2S,Skiathos Town|EO,SkopelosTown - Skopelos Isl.|EP,Troulos|";
arAirportResorts['TFS'] = "" + "AX,Costa Adeje|BI,Los Christianos|B0,Playa De Las Americas|";
arAirportResorts['SKG'] = "" + "";
arAirportResorts['VOL'] = "" + "";
arAirportResorts['ZTH'] = "" + "DC,Alikanas|CP,Kalamaki|CQ,Laganas|CR,Tsilivi|";


			/*
				Departure airports for each destination airport
			*/
			arAirportRoutes['AYT'] = "" + "";
arAirportRoutes['BJV'] = "" + "BRS,Bristol|LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['BOJ'] = "" + "LGW,London Gatwick|";
arAirportRoutes['CFU'] = "" + "BFS,Belfast|BHX,Birmingham|BRS,Bristol|EMA,East Midlands|GLA,Glasgow|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['CHQ'] = "" + "BHX,Birmingham|BRS,Bristol|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['HER'] = "" + "BFS,Belfast|BHX,Birmingham|BRS,Bristol|EMA,East Midlands|GLA,Glasgow|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['DLM'] = "" + "BRS,Bristol|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['FAO'] = "" + "BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['LPA'] = "" + "BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['HRG'] = "" + "LGW,London Gatwick|";
arAirportRoutes['KLX'] = "" + "BHX,Birmingham|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['KVA'] = "" + "BHX,Birmingham|BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['EFL'] = "" + "BHX,Birmingham|BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['KGS'] = "" + "BHX,Birmingham|BRS,Bristol|EMA,East Midlands|GLA,Glasgow|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['ACE'] = "" + "BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['LCA'] = "" + "BHX,Birmingham|BRS,Bristol|LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['LXR'] = "" + "LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['PMI'] = "" + "BHX,Birmingham|BRS,Bristol|GLA,Glasgow|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['JMK'] = "" + "LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['MJT'] = "" + "LGW,London Gatwick|";
arAirportRoutes['PFO'] = "" + "BHX,Birmingham|BRS,Bristol|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['PVK'] = "" + "EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['RHO'] = "" + "BFS,Belfast|BHX,Birmingham|BRS,Bristol|EMA,East Midlands|GLA,Glasgow|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['SMI'] = "" + "LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['JTR'] = "" + "BHX,Birmingham|BRS,Bristol|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['SSH'] = "" + "BRS,Bristol|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['JSI'] = "" + "BHX,Birmingham|BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['TFS'] = "" + "BHX,Birmingham|BRS,Bristol|EMA,East Midlands|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";
arAirportRoutes['SKG'] = "" + "BHX,Birmingham|LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['VOL'] = "" + "LGW,London Gatwick|MAN,Manchester|";
arAirportRoutes['ZTH'] = "" + "BHX,Birmingham|BRS,Bristol|EMA,East Midlands|GLA,Glasgow|LGW,London Gatwick|MAN,Manchester|NCL,Newcastle|";


			function CountryChanged() {
				var CountryCode = document.getElementById('Country').options[document.getElementById('Country').selectedIndex].value;
				document.getElementById("OutDepAir").innerHTML = "";
				document.getElementById("DestinationAirportResort").innerHTML = "";

				var newOption = document.createElement("option");
				newOption.innerHTML = "Please select a Country";
				document.getElementById("DestinationAirportResort").appendChild(newOption);
				
				var newOption2 = document.createElement("option");				
				newOption2.innerHTML = "Please select a Destination";
				document.getElementById("OutDepAir").appendChild(newOption2);
				//document.getElementById("OutDepAir").disabled = true;
				if(CountryCode != "")
					popArrAirs(CountryCode);
				else
					document.getElementById("DestinationAirportResort").disabled = true;
			}

			function DestinationAirportResortChanged() {
				var DestinationAirportResort = document.getElementById("DestinationAirportResort").options[document.getElementById("DestinationAirportResort").selectedIndex].value;
				var DestAir = DestinationAirportResort.split("|")[0];
				if(DestinationAirportResort != "")
					popDepAirs(DestAir);
				// Store this value in the global variable
				CurrentArrAirRes = DestinationAirportResort;
			}

			function OutDepAirChanged() {
				currentDepAir = document.getElementById("OutDepAir").value;
			}

			function popDepAirs(DestAir) {
				var temp = arAirportRoutes[DestAir].substr(0, arAirportRoutes[DestAir].length -1);
				var selDepartures = document.getElementById("OutDepAir");


				selDepartures.innerHTML = "";

				//selDepartures.disabled = true;

				var newOption = document.createElement("option");
				newOption.setAttribute("value", "");
				newOption.innerHTML = "Please select";
				selDepartures.appendChild(newOption);

				var arMyDepartures = temp.split("|");
				for(i=0; i<arMyDepartures.length; i++) {

					var arThisDeparture = arMyDepartures[i].split(",");
					var newOption = document.createElement("option");
					newOption.setAttribute("value", arThisDeparture[0]);
					if(arThisDeparture[0] == currentDepAir)
						newOption.selected = true;

					newOption.innerHTML = arThisDeparture[1];
					selDepartures.appendChild(newOption);
				}
				selDepartures.disabled = false;
				selDepartures.focus();
			}


			function popArrAirs(CountryCode) {
				var selArrivals = document.getElementById("DestinationAirportResort");
				var selDepartures = document.getElementById("OutDepAir");

				// Grab the current Arrival Airport / Resort to make this selected if still available after change
				prevSelection = false;

				if(CurrentArrAirRes != "") {
					var arCurrentArrAirRes = CurrentArrAirRes.split("|");
					var prevSelection = true;
				}


				selArrivals.disabled = false;
				selArrivals.innerHTML = "";
				//selArrivals.disabled = true;

				var newOption = document.createElement("option");
				newOption.setAttribute("value", "");
				newOption.innerHTML = "Please select";

				selArrivals.appendChild(newOption);

				var temp = arCountryAirports[CountryCode].substr(0, arCountryAirports[CountryCode].length -1);
				//alert(temp);
				var arMyAirports = temp.split("|");
				//alert(arMyAirports.length);
				for(i=0; i<arMyAirports.length; i++) {
					arThisAirport = arMyAirports[i].split(",");
					var newOption = document.createElement("option");
					newOption.setAttribute("value", arThisAirport[0] + "|");
					newOption.style.backgroundColor = "#eee";
					newOption.innerHTML = arThisAirport[1] + " (" + arThisAirport[0] + ")";
					
					//alert(arMyAirports[i]);
				
					if(prevSelection) {
						if((arCurrentArrAirRes[1]=="") && (arCurrentArrAirRes[0]==arThisAirport[0])) {
							newOption.selected = true;
						}
					}

					selArrivals.appendChild(newOption);

					var temp = arAirportResorts[arThisAirport[0]].substr(0, arAirportResorts[arThisAirport[0]].length -1);
					var arMyResorts = temp.split("|");

					for(j=0; j<arMyResorts.length; j++) {
						var arThisResort = arMyResorts[j].split(",");
						var newOption = document.createElement("option");
						newOption.setAttribute("value", arThisAirport[0] + "|" + arThisResort[0]);
						newOption.style.paddingLeft = "15px";
						newOption.innerHTML = arThisResort[1];

						if(prevSelection) {
							if((arCurrentArrAirRes[1]==arThisResort[0]) && (arCurrentArrAirRes[0]==arThisAirport[0])) {
								newOption.selected = true;
							}
						}

						selArrivals.appendChild(newOption);
					}
				}
				popDepAirs(arThisAirport[0]);
				
				if(prevSelection) {
					popDepAirs(arCurrentArrAirRes[0]);
				}
				
				prevSelection = false;
				selArrivals.disabled = false;
				selArrivals.focus();
			}
			
			/* 
				Remove leading zeros
				so parseInt works correctly
			*/
			
			function parseVal(val)
			{
			   while (val.charAt(0) == '0')
			      val = val.substring(1, val.length);
			
			   return val;
			}

			/*
				Validate check avail form on submit
			*/
			function checkAvail() {
				/*
					Airports
				*/
				var errMsg = "We still require the following information:";
				var doSubmit = true;

				var arDestination = document.getElementById("DestinationAirportResort").value.split("|");
				// alert(document.getElementById("DestinationAirportResort").value + "--" + arDestination[1]);
				// destination airport
				document.CriteriaForm.OutArrAir.value = arDestination[0];
				document.CriteriaForm.RetDepAir.value = arDestination[0];
				// resort
				// alert(document.CriteriaForm.Resort);
				document.CriteriaForm.Resort.value = arDestination[1];
				document.CriteriaForm.RetArrAir.value = document.CriteriaForm.OutDepAir.options[document.CriteriaForm.OutDepAir.selectedIndex].value;
				/*
					Dates
				*/
				var DateField = document.getElementById("OutDepDate");
				
				DateField.value = document.getElementById("OutDepDay").value + "/" + document.getElementById("OutDepMon").value + "/" + document.getElementById("OutDepYear").value;
				
				var ReturnDateField = document.getElementById("RetDepDate");
				var arDate = DateField.value.split("/");
				var DurationField = document.getElementById("Duration");
				
				var tempDate = new Date();
				tempDate.setFullYear (arDate[2], parseInt(parseVal(arDate[1])) - 1, arDate[0]);
				//alert(tempDate);
				tempDate = tempDate.addDays(DurationField.options[DurationField.selectedIndex].value);
				//alert(tempDate);
				ReturnDateField.value = tempDate.getDate() + "/" + (parseInt(tempDate.getMonth()) + 1) + "/" + tempDate.getFullYear();
				
				/*
					PAX
				*/
				var AdultField = document.getElementById("AdultPax");
				var ChildField = document.getElementById("ChildPax");
				var InfantField = document.getElementById("InfantPax");

				numPax = parseInt(AdultField.options[AdultField.selectedIndex].value) + parseInt(ChildField.options[ChildField.selectedIndex].value);

				if(numPax > 9) {
					errMsg = errMsg + "\r\n- You cannot book more than 9 adults + children online, please call us to make this booking";
					doSubmit = false;
				}

				if(document.getElementById("Country").value=="") {
					errMsg = errMsg + "\r\n- Please select a Country";
					doSubmit = false;
				}

				if(document.getElementById("DestinationAirportResort").value=="") {
					errMsg = errMsg + "\r\n- Please select a Destination Airport / Resort";
					doSubmit = false;
				}

				if(document.getElementById("OutDepAir").value=="") {
					errMsg = errMsg + "\r\n- Please select a Departure Airport";
					doSubmit = false;
				}

				/*
					Cookies
				*/
				createCookie("Country", document.getElementById("Country").value, "2");
				var arDestinationAirportResort = document.getElementById("DestinationAirportResort").value.split("|");
				createCookie("Resort", arDestinationAirportResort[1], "2");
				createCookie("OutArrAir", arDestinationAirportResort[0], "2");
				createCookie("OutDepAir", document.getElementById("OutDepAir").value, "2");
				createCookie("AdultPax", document.getElementById("AdultPax").value, "2");
				createCookie("ChildPax", document.getElementById("ChildPax").value, "2");
				createCookie("InfantPax", document.getElementById("InfantPax").value, "2");
				createCookie("OutDepDate", document.getElementById("OutDepDate").value, "2");
				createCookie("Duration", document.getElementById("Duration").value, "2");

				if(!doSubmit) {
					alert(errMsg);
				} else {
					var btnSubmit = document.getElementById("searchbut");
					//alert(btnSubmit.src);
					btnSubmit.src = "/images/pleasewait2.gif";
				}

				return doSubmit;
			}

			/*
				Update a group of dropdowns based on a hidden field
			*/
			function popDateDrops(fieldPrefix) {
				var DayField = document.getElementById(fieldPrefix + "Day");
				var MonthField = document.getElementById(fieldPrefix + "Mon");
				var YearField = document.getElementById(fieldPrefix + "Year");
				var DateField = document.getElementById(fieldPrefix + "Date");
				var arDate = DateField.value.split("/");

				DayField.options[arDate[0] -1].selected = true;

				for(i=0; i<MonthField.length; i++) {
					if(MonthField.options[i].value == arDate[1]) {
						MonthField.options[i].selected = true;
					}
				}

				for(i=0; i<YearField.length; i++) {
					if(YearField.options[i].value == arDate[2]) {
						YearField.options[i].selected = true;
					}
				}
			}

			/*
				Update a hidden field based on a group of dropdowns
			*/
			function popDateHidden(fieldPrefix) {
				var DayField = document.getElementById(fieldPrefix + "Day");
				var MonthField = document.getElementById(fieldPrefix + "Mon");
				var YearField = document.getElementById(fieldPrefix + "Year");
				var DateField = document.getElementById(fieldPrefix + "Date");

				DateField.value = DayField.options[DayField.selectedIndex].value + "/" + MonthField.options[MonthField.selectedIndex].value + "/" + YearField.options[YearField.selectedIndex].value;
			}

			/*
				Called by the calendar on close
			*/
			function calClose() {
				popDateDrops('OutDep');
			}

			/*
				General onload function, add anything you want to run onload into this
			*/
			
			function doOnload() {
					document.getElementById("searchbut").style.display = "block";
					document.getElementById("waitbut").style.display = "none";

					var tempMinMonth = psMinMonth + 1;
					document.getElementById('OutDepDate').value = psMinDay + "/" + tempMinMonth + "/" + psMinYear;
					popDateDrops('OutDep');
					readSearchCookies();
					CountryChanged();
				}


			function readSearchCookies() {
				/*if(readCookie("Country")) {
					currentCountry = readCookie("Country");
				} */
				if(readCookie("OutDepAir")) {
					currentDepAir = readCookie("OutDepAir");
				}
				if(readCookie("OutArrAir")) {
					CurrentArrAirRes = readCookie("OutArrAir") + "|";
					if(readCookie("Resort")) {
						CurrentArrAirRes = CurrentArrAirRes + readCookie("Resort");
					}
				}
				if(readCookie("AdultPax")) {
					var selAdultPax = document.getElementById("AdultPax");
					for(i=0; i<selAdultPax.length; i++) {
						if(selAdultPax.options[i].value == readCookie("AdultPax"))
							selAdultPax.options[i].selected = true;
					}
				}
				if(readCookie("ChildPax")) {
					var selChildPax = document.getElementById("ChildPax");
					for(i=0; i<selChildPax.length; i++) {
						if(selChildPax.options[i].value == readCookie("ChildPax"))
							selChildPax.options[i].selected = true;
					}
				}
				if(readCookie("InfantPax")) {
					var selInfantPax = document.getElementById("InfantPax");
					for(i=0; i<selInfantPax.length; i++) {
						if(selInfantPax.options[i].value == readCookie("InfantPax"))
							selInfantPax.options[i].selected = true;
					}
				}
				if(readCookie("Duration")) {
					var selDuration = document.getElementById("Duration");
					for(i=0; i<selDuration.length; i++) {
						if(selDuration.options[i].value == readCookie("Duration"))
							selDuration.options[i].selected = true;
					}
				}
				if(readCookie("OutDepDate")) {
					document.getElementById("OutDepDate").value = readCookie("OutDepDate");
					popDateDrops("OutDep")
				}
				/*if(currentCountry != "") {
					var selCountry = document.getElementById("Country");
					for(i=0; i<selCountry.length; i++) {
						if(selCountry.options[i].value==currentCountry)
							selCountry.options[i].selected = true;
					}
					CountryChanged();
				}*/
			}
		//--><!-- /* TIMESTAMP -23:06:53.6801250- */ -->