function count() { var sq_val=document.calc.sq.value.replace(",", ".")*document.calc.mat.value; var perim_val=document.calc.perim.value.replace(",", ".")*document.calc.perim_k.value; var lustr_val=document.calc.lustr.value.replace(",", ".")*document.calc.lustry_k.value; var svet_val=document.calc.svet.value.replace(",", ".")*document.calc.svet_k.value; var trub_val=document.calc.trub.value.replace(",", ".")*document.calc.trub_k.value; var kriv_val=document.calc.kriv.value.replace(",", ".")*document.calc.kriv_k.value; var ugol_val=document.calc.ugol.value.replace(",", ".")*document.calc.ugol_k.value; var all_elements=sq_val+perim_val+lustr_val+svet_val+trub_val+ kriv_val+ugol_val; if (document.getElementById("center").checked) { all_elements=all_elements*document.calc.center_k.value.replace(",", "."); } if (document.getElementById("combi").checked) { all_elements=all_elements*document.calc.combi_k.value.replace(",", "."); } document.calc.itog.value=all_elements; }; function change_pic() { //alert(document.calc.mat.selectedIndex); document.getElementById("pic").src=pics[document.calc.mat.selectedIndex+1]; }