// Zusatzpreise "Merkmale" berechnen
function calculate_additional_prices() {
	var lm = parseInt($('id[txt_36]').value) / 1000; // Gesamtbreite Meter
	var mwst = 1.19;

  if (parseInt($('id[txt_36]').value) > 0 && !isNaN(parseInt($('id[txt_36]').value))) {
	for (var i=950; i<=965; i++) { // AluFB Ausladung
		var mp = parseFloat($('price_id[118]'+i+'_p').value) * lm * mwst;
		mp = Math.round(parseFloat(mp)/0.01)*0.01;

		$('price_id[118]'+i+'_mp').value=parseFloat(mp);

  		if ($('id[118]'+i).checked == true) {
		  $('alufb_ausl_tmp').value = mp;
		  $('gesamtpreis').value = 0;
		  $('gesamtpreis').value = parseFloat($('gesamtpreis').value) + parseFloat(mp);
		  var fprice = (Math.round($('gesamtpreis').value * 100) / 100).toString();
          fprice += (fprice.indexOf('.') == -1)? '.00' : '00';
          fprice = fprice.substring(0, fprice.indexOf('.') + 3);
          fprice = fprice.replace(/\./g, ',');
          while (fprice.search(/\d{4}/) != -1)
          fprice = fprice.replace(/(\d+)(\d{3})/, "$1.$2");
		  $('basispreis').innerHTML = fprice;
		}

  		var k = (Math.round(mp * 100) / 100).toString();
		k += (k.indexOf('.') == -1)? '.00' : '00';
 	 	k = k.substring(0, k.indexOf('.') + 3);
		k = k.replace(/\./g, ',');
		k = k.substring(0, k.indexOf(',')+3);

		$('id[118]'+i+'_mpd').innerHTML='(+'+k+' EUR)';
	}
  }

return true;
}

function calculateBasePrice() { }