Ledek.si dostava ledu

<script>
function calc2(mode){
var c1 = document.getElementById(‘c1’);
var c2 = document.getElementById(‘c2’);
var c3 = document.getElementById(‘c3’);
var i1 = document.getElementById(‘i1’);
var i2 = document.getElementById(‘i2’);
var i3 = document.getElementById(‘i3’);
var r = document.getElementById(‘calc_res’);
var summ = 0;
if (c1.checked) summ = summ + (parseInt(i1.value, 10) * 1.5)
if (c2.checked) summ = summ + (parseInt(i2.value, 10) * 2.5);
if (c3.checked) summ = summ + (parseInt(i3.value, 10) * 2.75);
r.innerHTML = (summ + ”).replace(/\./, ‘,’) + ‘ kg.’;
}
</script>

<p align=”left”><strong>Izračun zagotavlja zadostno količino ledu za vaš dogodek.</strong></p>
<form action=”.” class=”form”>
<table class=”contact2 calc”>
<tbody>
<tr class=”thirst”>
<td width=”224″ class=”c1″><label> Izberite vrsto prireditve:</label></td>
<td width=”234″ class=”c2″><label>Vnesite željeno število gostov:</label></td>
</tr>
<tr class=”last”>
<td class=”c1″>
<input checked=”checked” class=”c” name=”c” value=”1″ id=”c1″ onclick=”calc2(1)” type=”radio” />
<label for=”c1″>Koncert / Party</label>
</td>
<td class=”c2″>
<input class=”i” id=”i1″ size=”4″ onkeyup=”calc2(0)” />
</td>
</tr>
<tr class=”last”>
<td class=”c1″>
<input class=”c” name=”c” value=”2″ id=”c2″ onclick=”calc2(2)” type=”radio” />
<label for=”c2″>Piknik</label>
</td>
<td class=”c2″>
<input class=”i” id=”i2″ size=”4″ onkeyup=”calc2(0)” />
</td>
</tr>
<tr class=”last”>
<td class=”c1″>
<input class=”c” name=”c” value=”3″ id=”c3″ onclick=”calc2(3)” type=”radio” />
<label for=”c2″>Koktejl party</label>
</td>
<td class=”c2″>
<input class=”i” id=”i3″ size=”4″ onkeyup=”calc2(0)” />
</td>
</tr>
</tbody>
</table>
</form>
<p>
Skupna količina ledu ki ga potrebujete: <span id=”calc_res”> kg.</span>
</p>