



function build_price_vat() {

	iEcStatus = document.getElementById("iECStatus").value;
	if(iEcStatus == 0 || iEcStatus ==1) {
		iTotalPrice = Number(document.getElementById("tTotalCost").value)+Number(document.getElementById("tVatAmount").value);	
	} else {
		iTotalPrice = Number(document.getElementById("tTotalCost").value);	
	}

	return iTotalPrice;
	
}

function build_price_plus_vat_or_not(price) {
	iEcStatus = document.getElementById("iECStatus").value;
	if(iEcStatus == 0 || iEcStatus ==1) {
		iTotalPrice = Number(price)+Number(document.getElementById("tVatAmount").value);	
	} else {
		iTotalPrice = Number(price);	
	}
}

function set_price(sCurS, oTotalPrice) {
price = build_price_vat();	
sFPrice = new NumberFormat(price).toFormatted();
//oTotalPrice = document.getElementById("dsp_TotalPrice");
oTotalPrice.innerHTML = sCurS+sFPrice;
price2 = build_price_plus_vat_or_not(price);

}