function addVat()
{
	var price_b1 = parseFloat(document.getElementById('price_n1').value) + parseFloat(document.getElementById('price_n1').value * document.getElementById('vat').value);
	
	if (!isNaN(price_b1))
		document.getElementById('price_b1').value = price_b1;
	else
		document.getElementById('price_b1').value = '';
			
		
	var price_b2 = parseFloat(document.getElementById('price_n2').value) + parseFloat(document.getElementById('price_n2').value * document.getElementById('vat').value);
	
	if (!isNaN(price_b2))
		document.getElementById('price_b2').value = price_b2;
	else
		document.getElementById('price_b2').value = '';		
		
				
		
	var price_b3 = parseFloat(document.getElementById('price_n3').value) + parseFloat(document.getElementById('price_n3').value * document.getElementById('vat').value);
	
	if (!isNaN(price_b3))
		document.getElementById('price_b3').value = price_b3;
	else
		document.getElementById('price_b3').value = '';		
}





function addVat2()
{
	var price_n1 = parseFloat(document.getElementById('price_b1').value / (document.getElementById('vat2').value));
		
	if (!isNaN(price_n1))
		document.getElementById('price_n1').value = Math.round(price_n1*100)/100;
	else
		document.getElementById('price_n1').value = '';
		
		
	var price_n2 = parseFloat(document.getElementById('price_b2').value / (document.getElementById('vat2').value));
	
	if (!isNaN(price_n2))
		document.getElementById('price_n2').value = Math.round(price_n2*100)/100;
	else
		document.getElementById('price_n2').value = '';		
		
				
		
	var price_n3 = parseFloat(document.getElementById('price_b3').value / (document.getElementById('vat2').value));
	
	if (!isNaN(price_n3))
		document.getElementById('price_n3').value = Math.round(price_n3*100)/100;
	else
		document.getElementById('price_n3').value = '';		
}



function addVat3()
{
	var vatr = parseFloat(document.getElementById('vat').value* 100)

	if (vatr > 100)
	{
		var price_b1 = parseFloat(document.getElementById('price_n1').value / (document.getElementById('vat').value));
			
		if (!isNaN(price_b1))
			document.getElementById('price_b1').value = Math.round(price_b1*100)/100;
		else
			document.getElementById('price_b1').value = '';
			
			
		var price_b2 = parseFloat(document.getElementById('price_n2').value / (document.getElementById('vat').value));
		
		if (!isNaN(price_b2))
			document.getElementById('price_b2').value = Math.round(price_b2*100)/100;
		else
			document.getElementById('price_b2').value = '';		
			
					
			
		var price_b3 = parseFloat(document.getElementById('price_n3').value / (document.getElementById('vat').value));
		
		if (!isNaN(price_b3))
			document.getElementById('price_b3').value = Math.round(price_b3*100)/100;
		else
			document.getElementById('price_b3').value = '';		
	}
	else
	{
		var price_b1 = parseFloat(document.getElementById('price_n1').value) + parseFloat(document.getElementById('price_n1').value * document.getElementById('vat').value);
		
		if (!isNaN(price_b1))
			document.getElementById('price_b1').value = price_b1;
		else
			document.getElementById('price_b1').value = '';
				
			
		var price_b2 = parseFloat(document.getElementById('price_n2').value) + parseFloat(document.getElementById('price_n2').value * document.getElementById('vat').value);
		
		if (!isNaN(price_b2))
			document.getElementById('price_b2').value = price_b2;
		else
			document.getElementById('price_b2').value = '';		
			
					
			
		var price_b3 = parseFloat(document.getElementById('price_n3').value) + parseFloat(document.getElementById('price_n3').value * document.getElementById('vat').value);
		
		if (!isNaN(price_b3))
			document.getElementById('price_b3').value = price_b3;
		else
			document.getElementById('price_b3').value = '';	
	}
	
}
