<!--

var globalprice=0;
var gbphuf = 344;
var eurhuf = 283;

	if (document.getElementById('gbphuf')) {
		document.getElementById('gbphuf').innerHTML = gbphuf;
	}
	if (document.getElementById('eurhuf')) {
		document.getElementById('eurhuf').innerHTML = eurhuf;
	}

	if (document.getElementById('gbphuf')) {
		document.getElementById('gbphuf').value= gbphuf;
	}
	if (document.getElementById('eurhuf')) {
		document.getElementById('eurhuf').value = eurhuf;
	}

function calcprice() {
	var persons = document.getElementById('persons').value;
	var airport = document.getElementById('route').value;
	var price = 0;	
	
	 	if (airport == 'ferihegy-bp' || airport == 'bp-ferihegy' || airport == 'bpa-dock' || airport == 'dock-bpa') {
			var price = 9000; 
			if (persons<1) price = 0; 
      if (persons<2) price = 9000;            
      if (persons>4) price = 18000; 
      if (persons>8) price = 30500; 
      if (persons>15) price = 50500; 
      if (persons>23) price = 80500; 
      if (persons>27) price = 130500;  
		}
		else if (airport == 'rtkeleti-bp' || airport == 'bp-rtkeleti' || airport == 'rtnyugati-bp' || airport == 'bp-rtnyugati' || airport == 'rtdeli-bp' || airport == 'bp-rtdeli' || airport == 'bp-dock' || airport == 'dock-bp') {
			var price = 9000;
			if (persons<1) price = 0; 
			if (persons>4) price = 18000;
			if (persons>8) price = 30500;
			if (persons>15) price = 50500;
			if (persons>23) price = 80500;
			if (persons>27) price = 130500;
		}
		
		else if (airport == 'ferihegy-bpsur' || airport == 'bpsur-ferihegy') {
			var price = 15000;
			if (persons<1) price = 0; 
			if (persons>4) price = 28000;
			if (persons>8) price = 40000;
			if (persons>15) price = 68000;
			if (persons>23) price = 95000;
			if (persons>27) price = 145000;
		}
		else if (airport == 'ferihegy-sziget' || airport == 'sziget-ferihegy') {
			var price = 10000;
			if (persons<1) price = 0; 
			if (persons>4) price = 19000;
			if (persons>8) price = 33000;
			if (persons>15) price = 55500;
			if (persons>23) price = 90500;
			if (persons>27) price = 140500;
		}
		else if (airport == 'ferihegy-hungaroring' || airport == 'hungaroring-ferihegy') {
			var price = 30900;
			if (persons<1) price = 0; 
			if (persons>4) price = 47900;
			if (persons>8) price = 69900;
			if (persons>15) price = 120900;
			if (persons>23) price = 180900;
			if (persons>27) price = 230900;
		}
		else if (airport == 'balatoneast-bp' || airport == 'bp-balatoneast') {
			var price = 55000;
			if (persons<1) price = 0;
			if (persons>4) price = 55000;
			if (persons>8) price = 72500;
			if (persons>15) price = 98800;
			if (persons>29) price = 138000;
		}
		else if (airport == 'balatonwest-bp' || airport == 'bp-balatonwest') {
			var price = 63000;
			if (persons<1) price = 0;
			if (persons>4) price = 63000;
			if (persons>8) price = 84500;
			if (persons>15) price = 126800;
			if (persons>29) price = 165000;
		}
		else if (airport == 'vienna-bp' || airport == 'bp-vienna') {
			var price = 80000;
			if (persons<1) price = 0;
			if (persons>4) price = 80000;
			if (persons>8) price = 145000;
			if (persons>15) price = 200000;
			if (persons>29) price = 370000;
		}
		else if (airport == 'bratislava-bp' || airport == 'bp-bratislava') {
			var price = 70000;
			if (persons<1) price = 0;
			if (persons>4) price = 70000;
			if (persons>8) price = 135000;
			if (persons>15) price = 190000;
			if (persons>29) price = 360000;
		}
		else if (airport == 'bp-othercity' || airport == 'othercity-bp') {
			var price = 0;
			if (persons<1) price = 0;
			if (persons>4) price = 0;
			if (persons>8) price = 0;
			if (persons>15) price = 0;
			if (persons>29) price = 0;
		}
	




		else if (airport == 'ferihegy-kecskemet' || airport == 'kecskemet-ferihegy') {
			var price = 40500;
			if (persons<1) price = 0;
			if (persons>4) price = 40500;
			if (persons>8) price = 62800;
			if (persons>15) price = 93200;
			if (persons>29) price = 125800;
		}

		else if (airport == 'ferihegy-pecs' || airport == 'pecs-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-bcsaba' || airport == 'bcsaba-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-miskolc' || airport == 'miskolc-ferihegy') {
			var price = 70800;
			if (persons<1) price = 0;
			if (persons>4) price = 70800;
			if (persons>8) price = 85200;
			if (persons>15) price = 140300;
			if (persons>29) price = 220000;
		}

		else if (airport == 'ferihegy-god' || airport == 'god-ferihegy') {
			var price = 15000;
			if (persons<1) price = 0; 
			if (persons>4) price = 28000;
			if (persons>8) price = 40000;
			if (persons>15) price = 68000;
			if (persons>23) price = 95000;
			if (persons>27) price = 145000;
		}

		else if (airport == 'ferihegy-siofok' || airport == 'siofok-ferihegy') {
			var price = 55000;
			if (persons<1) price = 0;
			if (persons>4) price = 55000;
			if (persons>8) price = 72500;
			if (persons>15) price = 98800;
			if (persons>29) price = 138000;
		}

		else if (airport == 'ferihegy-balfenyves' || airport == 'balfenyves-ferihegy') {
			var price = 63000;
			if (persons<1) price = 0;
			if (persons>4) price = 63000;
			if (persons>8) price = 84500;
			if (persons>15) price = 126800;
			if (persons>29) price = 165000;
		}
		
		else if (airport == 'ferihegy-balfured' || airport == 'balfured-ferihegy') {
			var price = 63000;
			if (persons<1) price = 0;
			if (persons>4) price = 63000;
			if (persons>8) price = 84500;
			if (persons>15) price = 126800;
			if (persons>29) price = 165000;
		}

		else if (airport == 'ferihegy-szeged' || airport == 'szeged-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-szfvar' || airport == 'szfvar-ferihegy') {
			var price = 40500;
			if (persons<1) price = 0;
			if (persons>4) price = 40500;
			if (persons>8) price = 62800;
			if (persons>15) price = 93200;
			if (persons>29) price = 125800;
		}

		else if (airport == 'ferihegy-gyor' || airport == 'gyor-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-debrecen' || airport == 'debrecen-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-eger' || airport == 'eger-ferihegy') {
			var price = 40500;
			if (persons<1) price = 0;
			if (persons>4) price = 40500;
			if (persons>8) price = 62800;
			if (persons>15) price = 93200;
			if (persons>29) price = 125800;
		}

		else if (airport == 'ferihegy-szolnok' || airport == 'szolnok-ferihegy') {
			var price = 40500;
			if (persons<1) price = 0;
			if (persons>4) price = 40500;
			if (persons>8) price = 62800;
			if (persons>15) price = 93200;
			if (persons>29) price = 125800;
		}

		else if (airport == 'ferihegy-tbanya' || airport == 'tbanya-ferihegy') {
			var price = 40500;
			if (persons<1) price = 0;
			if (persons>4) price = 40500;
			if (persons>8) price = 62800;
			if (persons>15) price = 93200;
			if (persons>29) price = 125800;
		}

		else if (airport == 'ferihegy-starjan' || airport == 'starjan-ferihegy') {
			var price = 40500;
			if (persons<1) price = 0;
			if (persons>4) price = 40500;
			if (persons>8) price = 62800;
			if (persons>15) price = 93200;
			if (persons>29) price = 125800;
		}

		else if (airport == 'ferihegy-kaposvar' || airport == 'kaposvar-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-nyhaza' || airport == 'nyhaza-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-szekszard' || airport == 'szekszard-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-szhely' || airport == 'szhely-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

		else if (airport == 'ferihegy-tihany' || airport == 'tihany-ferihegy') {
			var price = 63000;
			if (persons<1) price = 0;
			if (persons>4) price = 63000;
			if (persons>8) price = 84500;
			if (persons>15) price = 126800;
			if (persons>29) price = 165000;
		}

		else if (airport == 'ferihegy-veszprem' || airport == 'veszprem-ferihegy') {
			var price = 63000;
			if (persons<1) price = 0;
			if (persons>4) price = 63000;
			if (persons>8) price = 84500;
			if (persons>15) price = 126800;
			if (persons>29) price = 165000;
		}

		else if (airport == 'ferihegy-zegerszeg' || airport == 'zegerszeg-ferihegy') {
			var price = 70700;
			if (persons<1) price = 0;
			if (persons>4) price = 70700;
			if (persons>8) price = 85100;
			if (persons>15) price = 140200;
			if (persons>29) price = 220500;
		}

	if (document.getElementById('returntransfer').checked) {
		price = price*1.9;
	}
	globalprice= price;

	var sprice = Math.round(price/eurhuf)+' EUR -or- '+Math.round(price/gbphuf)+' GBP -or- '+addCommas(price)+' HUF';		 
	var pprice = price/persons;
	var psprice = Math.round(pprice/eurhuf)+' EUR -or- '+Math.round(pprice/gbphuf)+' GBP -or- '+addCommas(Math.round(pprice))+' HUF';
	
	if (document.getElementById('price')) {
		document.getElementById('price').innerHTML = sprice;
	}
	if (document.getElementById('pprice')) {
		document.getElementById('pprice').innerHTML = psprice;
	}
	if (document.getElementById('price2')) {
		document.getElementById('price2').innerHTML = sprice;
	}

	if (document.getElementById('iprice')) {
		document.getElementById('iprice').value = sprice;
	}
	if (document.getElementById('ipprice')) {
		document.getElementById('ipprice').value = psprice;
	}
	if (document.getElementById('iprice2')) {
		document.getElementById('iprice2').value = sprice;
	}
}

function addCommas(nStr)
{
	var rgx = / /;
	while (rgx.test(nStr)) {
		nStr = nStr.replace(rgx,"");
	}

	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ' ' + '$2');
	}
	return x1 + x2;
}


//-->