function SelectFlightAirport(SelectField)
{
	var basedomain = lang2basedomain();
	var WinSelectFlightAirport = window.open(basedomain+'/Flights/SelectAirport.aspx?SelectField='+SelectField, 'SelectAirport', 'width=540, height=450, title=no, top=20, left=20, noborder, scrollbars=yes');
	WinSelectFlightAirport.focus();
}

function SelectHotelDestination()
{
	var basedomain = lang2basedomain();
	var WinSelectHotelDestination = window.open(basedomain+'/Hotels/SelectDestination.aspx', 'SelectDestination', 'width=540, height=450, title=no, top=20, left=20, noborder, scrollbars=yes');
	WinSelectHotelDestination.focus();
}

function SelectCarLocation(locationType)
{
	var basedomain = lang2basedomain();
	var WinSelectCarLocation = window.open(basedomain+'/Cars/SelectAirport.aspx', 'SelectLocation', 'width=540, height=450, title=no, top=20, left=20, noborder, scrollbars=yes');
	WinSelectCarLocation.focus();
}

function SelectHostelDestination()
{
	var basedomain = lang2basedomain();
	var WinSelectHostelDestination = window.open(basedomain+'/Hostels/SelectDestination.aspx', 'SelectDestination', 'width=540, height=450, title=no, top=20, left=20, noborder, scrollbars=yes');
	WinSelectHostelDestination.focus();
}

function SelectVacationDestination(SelectField)
{
	var basedomain = lang2basedomain();
	var WinSelectVacationDestination = window.open(basedomain+'/Vacations/SelectCountryOrDestination.aspx?SelectField='+SelectField, 'SelectDestination', 'width=540, height=450, title=no, top=20, left=20, noborder, scrollbars=yes');
	WinSelectVacationDestination.focus();
}

function lang2basedomain()
{
	var mylang = document.getElementById('lang');
	if (mylang!=null)
	{
		var langvalue = mylang.value;
		if (langvalue == 'it')
		{
			return 'http://www.europelowcost.com';
		}
		if (langvalue == 'es')
		{
			return 'http://www.europelowcost.es';
		}
		if (langvalue == 'fr')
		{
			return 'http://www.europelowcost.fr';
		}
		if (langvalue == 'de')
		{
			return 'http://www.europelowcost.de';
		}
		if (langvalue == 'en')
		{
			return 'http://en.europelowcost.com';
		}
	}

}