// JavaScript Document
var pointModel = new DynamicOptionList("countrylist","startpoint");

pointModel.forValue("Cyprus").addOptionsTextValue("Larnaca Airport (LCA)","3","Paphos Airport (PFO)","6","Limassol Port","5");
pointModel.forValue("Cyprus").setDefaultOptions("3");
pointModel.forValue("France").addOptionsTextValue("Beauvais Airport (BVA)","2","Charles de Gaulle Airport (CDG)","1","Nice Airport (NCE)","1368","Orly Airport (ORY)","3");
pointModel.forValue("France").setDefaultOptions("1");
pointModel.forValue("Greece").addOptionsTextValue("Athens Airport (ATH)","1604","Chania Airport (CHQ)","1616","Corfu Airport (CFU)","2172","Heraklion Airport (HER)","1"
,"Kefalonia Airport (EFL)","3221","Kos Airport (KGS)","3522","Mytilene Airport (MJT)","1809","National Araxos Airport (GPA)","1692","Rhodes Airport (RHO)","1610","Thessaloniki Macedonia Airport (SKG)","1606","Zakynthos Airport (ZTH)","2983","Agios nikolaos Port","1663","Chania souda Port","1684","Corfu Port","2173","Heraklion Port","1617","Kos Port","3523","Mytilene Port","1810","Patras Port","1620","Piraeus Port","1618","Rethymno Port","1685","Rhodes Port","1683","Thessaloniki Port","1619","Zakynthos Port","2984");
pointModel.forValue("Greece").setDefaultOptions("1604");
pointModel.forValue("Italy").addOptionsTextValue("Alghero Airport (AHO)","1","Cagliari Elmas Airport (CAG)","2","Ciampino airport (CIA)","5","Fiumicino airport (FCO)","4","Olbia Costa Smeralda Airport (OLB)","3");
pointModel.forValue("Italy").setDefaultOptions("4");
pointModel.forValue("United Kingdom").addOptionsTextValue("Gatwick Airport (LGW)","2739","Heathrow Airport (LHR)","2738","London City Airport (LCY)","2741","Luton Airport (LTN)","2742","Stansted Airport (STN)","2740");
pointModel.forValue("United Kingdom").setDefaultOptions("2739");
pointModel.forValue("Spain").addOptionsTextValue("Fuerteventura Airport (FUE)","1609","Gran Canaria Las Palmas Airport (LPA)","1231","Lanzarote Airport (ACE)","1698","Menorca Airport (MAH)","551","Palma de Mallorca Airport (PMI)","1","Tenerife Airport North Los Rodeos (TFN)","807","Tenerife Airport South Reina Sofia (TFS)","806","Fuerteventura Port Morro Jable","1610","Lanzarote Port Playa Blanca","1699","Las Palmas Port","1207","Mallorca Palma Port","2","Menorca Port Mahon","552","Tenerife Port Los Cristianos","809","Tenerife Port Santa Cruz","808");
pointModel.forValue("Spain").setDefaultOptions("1609");
pointModel.forValue("Turkey").addOptionsTextValue("Antalya Airport (AYT)","4","Ataturk Istanbul Airport (IST)","432","Bodrum Airport (BJV)","2","Dalaman Airport (DLM)","3","Esenboga Ankara Airport (ESB)","434","Izmir Airport (ADB)","1","Sabiha Gokcen Airport (SAW)","433","Bodrum port","869","Cesme port","911","Izmir Alsancak port","858","Karakoy port Istanbul","857","Kusadasi port","859","Marmaris port","875","Salipazari port","1060");
pointModel.forValue("Turkey").setDefaultOptions("432");


function submitform () {
    var countrybox = document.getElementById("countrylist");
    var startpointbox = document.getElementById("startpoint");
	
	
	if (countrybox.selectedIndex<0) {
		alert("Please select country");
		return false;
	}
	
	if (startpointbox.selectedIndex<0) {
		alert("Please select airport or port");
		return false;
	}else{
		
		var countryurl="";
		switch (countrybox.selectedIndex) {
			case 0: countryurl = "http://www.cyprustaxireservations.com"; break;
			case 1: countryurl = "http://www.francetaxireservations.com"; break;
			case 2: countryurl = "http://www.taxireservations.gr"; break;
			case 3: countryurl = "http://www.bookyourtransfer.com";document.getElementById("usercode").value="mpyx";document.getElementById("showhome").value=""; break;
			case 4: countryurl = "http://www.spaintaxireservations.com"; break;
			case 5: countryurl = "http://www.turkeytaxireservations.com"; break;
			case 6: countryurl = "http://www.taxireservations.co.uk"; break;
			default: countryurl = "http://www.bookyourtransfer.com";
		}
		document.formpoint.action =	countryurl + "/DestPointSearchOp.action";
	}
	
	
	document.formpoint.submit();
}



























