function transferPrice(num){
var inDiv=document.getElementById('transferPrice');
var inTxt=document.getElementById('transferPrices');
var trTyp=document.getElementById('trType').value;
//var curTrans=document.getElementById('cNum').value;
var curTrans=num;
if(curTrans=='1-3'){
	if(trTyp=='1'){
	inDiv.innerHTML='17 &euro;';
	inTxt.value='17';
	}	
	if(trTyp=='2'){
	inTxt.value='23.5';
	inDiv.innerHTML='23.5 &euro;';
	}
	if(trTyp=='3'){
	inTxt.value='12.5';
	inDiv.innerHTML='12.5  &euro;';
	}
}
if(curTrans=='4-7'){
	if(trTyp=='1'){
	inTxt.value='25';
	inDiv.innerHTML='25 &euro;';
	}	
	if(trTyp=='2'){
	inTxt.value='36';
	inDiv.innerHTML='36 &euro;';
	}
	if(trTyp=='3'){
	inTxt.value='20';
	inDiv.innerHTML='20 &euro;';
	}
}
if(curTrans=='8-14'){
	if(trTyp=='1'){
	inTxt.value='33.5';
	inDiv.innerHTML='33.5 &euro;';
	}	
	if(trTyp=='2'){
	inTxt.value='49.5';
	inDiv.innerHTML='49.5 &euro;';
	}
	if(trTyp=='3'){
	inTxt.value='28.5';
	inDiv.innerHTML='28.5 &euro;';
	}
}
if(curTrans=='15-18'){
	if(trTyp=='1'){
	inTxt.value='41.5';
	inDiv.innerHTML='41.5 &euro;';
	}	
	if(trTyp=='2'){
	inTxt.value='62';
	inDiv.innerHTML='62 &euro;';
	}
	if(trTyp=='3'){
	inTxt.value='36.5';
	inDiv.innerHTML='36.5 &euro;';
	}
}
getTotalPrice();

}

function detectEnds(curValue,sentValue){
var muuDiv=document.getElementById('muu2');
	if(curValue==sentValue){
		muuDiv.style.visibility='visible';
}else{
		muuDiv.style.visibility='hidden';
}
}
function detectBegins(curValue,sentValue){
var muuDiv=document.getElementById('muu');
	if(curValue==sentValue){
		muuDiv.style.visibility='visible';

}else{
	muuDiv.style.visibility='hidden';
}
}
function childSeatz(cvalue){
var childDiv=document.getElementById('childSeatz');
var childInp=document.getElementById('childInp');
curValue=cvalue*2.5;
childDiv.innerHTML='' + curValue + ' &euro;';
childInp.value=curValue;
getTotalPrice();
}
function golfBagz(cvalue){
var childDiv=document.getElementById('golfBag');
var childInp=document.getElementById('golfBagInp');
curValue=cvalue*2.5;
childDiv.innerHTML='' + curValue + ' &euro;';
childInp.value=curValue;
getTotalPrice();
}
function addBag(cvalue){
var childDiv=document.getElementById('addBagz');
var childInp=document.getElementById('addBagInp');
curValue=cvalue*2.5;
childDiv.innerHTML='' + curValue + ' &euro;';
childInp.value=curValue;
getTotalPrice();
}
function bikez(cvalue){
var childDiv=document.getElementById('biked');
var childInp=document.getElementById('bikeInp');
curValue=cvalue*5;
childDiv.innerHTML='' + curValue + ' &euro;';
childInp.value=curValue;
getTotalPrice();
}
function invalidz(cvalue){
var childDiv=document.getElementById('invalidd');
var childInp=document.getElementById('invalidInp');
curValue=cvalue*2.5;
childDiv.innerHTML='' + curValue + ' &euro;';
childInp.value=curValue;
getTotalPrice();
}
function getTotalPrice(){
transPrice=Math.round(document.getElementById('transferPrices').value);
childPrice=Math.round(document.getElementById('childInp').value);
addBagPrice=Math.round(document.getElementById('addBagInp').value);
golfBagPrice=Math.round(document.getElementById('golfBagInp').value);
bikePrice=Math.round(document.getElementById('bikeInp').value);
invaPrice=Math.round(document.getElementById('invalidInp').value);
var fullPrice=transPrice+childPrice+addBagPrice+golfBagPrice+bikePrice+invaPrice;
var totalDiv=document.getElementById('totalz');
var totalInp=document.getElementById('total');
totalDiv.innerHTML=fullPrice + ' &euro;';
totalInp.value=fullPrice;

}
