function sel_marchio(){agg_tot();var e=document.getElementById("marchio");var value=e.value;if(value=="1"){document.getElementById("pt_huawei").style.display="block";document.getElementById("pt_zucchetti").style.display="none";document.getElementById("pt_aton").style.display="none";document.getElementById('marchio_calcolo').value='1'}else if(value=="2"){document.getElementById("pt_huawei").style.display="none";document.getElementById("pt_zucchetti").style.display="block";document.getElementById("pt_aton").style.display="none";document.getElementById('marchio_calcolo').value='2'}else{document.getElementById("pt_huawei").style.display="none";document.getElementById("pt_zucchetti").style.display="none";document.getElementById("pt_aton").style.display="block";document.getElementById('marchio_calcolo').value='3'}
}
function agg_tot(){
var marc=document.getElementById('marchio_calcolo').value;var c_ric=document.getElementById('c_ric').value;var s_socc=document.getElementById('s_socc').value;var ptot=0;var totale=0;
c_ric=Number(c_ric);s_socc=Number(s_socc);if(marc=="1"){kw=document.getElementById('kw_potenza_h').value;acc=document.getElementById('kw_acc_h').value;
if(kw=="3.5"){if(acc=="0"){ptot=11447}else if(acc=="5"){ptot=14795}else if(acc=="10"){ptot=17170}else if(acc=="15"){ptot=19555}else{ptot=22895}}else if(kw=="4.5"){if(acc=="0"){ptot=13100}else if(acc=="5"){ptot=16448}else if(acc=="10"){ptot=18820}else if(acc=="15"){ptot=21200}else{ptot=24546}}else if(kw=="5"){if(acc=="0"){ptot=14440}else if(acc=="5"){ptot=17790}else if(acc=="10"){ptot=20165}else if(acc=="15"){ptot=22540}else{ptot=25890}}else{if(acc=="0"){ptot=16000}else if(acc=="5"){ptot=19300}else if(acc=="10"){ptot=21670}else if(acc=="15"){ptot=24000}else{ptot=27400}}
totale=ptot+c_ric+s_socc}else if(marc=="2"){kw=document.getElementById('kw_potenza_z').value;acc=document.getElementById('kw_acc_z').value;
if(kw=="3.5"){if(acc=="0"){ptot=12570}else if(acc=="5"){ptot=14720}else if(acc=="10"){ptot=16860}else if(acc=="15"){ptot=19000}else{ptot=21150}}else if(kw=="4.5"){if(acc=="0"){ptot=14300}else if(acc=="5"){ptot=16440}else if(acc=="10"){ptot=18585}else if(acc=="15"){ptot=20730}else{ptot=22875}}else if(kw=="5"){if(acc=="0"){ptot=15700}else if(acc=="5"){ptot=17850}else if(acc=="10"){ptot=20000}else if(acc=="15"){ptot=22150}else{ptot=24300}}else{if(acc=="0"){ptot=17150}else if(acc=="5"){ptot=19300}else if(acc=="10"){ptot=21430}else if(acc=="15"){ptot=23570}else{ptot=25700}}
totale=ptot+c_ric+s_socc}else{kw=document.getElementById('kw_potenza_a').value;acc=document.getElementById('kw_acc_a').value;
if(kw=="3"){
if(acc=="5"){ptot=14720}else if(acc=="10"){ptot=16790}else if(acc=="15"){ptot=18860}else{ptot=20930}}else if(kw=="4"){
if(acc=="5"){ptot=16430}else if(acc=="10"){ptot=18500}else if(acc=="15"){ptot=20570}else{ptot=22635}}else if(kw=="5"){if(acc=="0"){ptot=16100}else if(acc=="5"){ptot=17885}else if(acc=="10"){ptot=19950}else if(acc=="15"){ptot=22000}else{ptot=24000}}else{if(acc=="0"){ptot=17820}else if(acc=="5"){ptot=19560}else if(acc=="10"){ptot=21630}else if(acc=="15"){ptot=23700}else{ptot=25770}}
totale=ptot+c_ric+s_socc;
}
document.getElementById('totale').value=totale}