studentPas,
<script>
function sums()
{
sum=0;
for(i=1;i<11;i++)
{
var elem=document.getElementById("r"+i);
if(elem.checked)sum=sum+parseInt(elem.value);
}
document.formText.sumOut.value=sum*0.3;
var k = sum*0.3;
return k;
}
function sums1()
{
sum1=0;
for(i=1; i<11; i++)
{
var elem=document.getElementById("g"+i);
if(elem.checked)sum1=sum1+parseInt(elem.value);
}
document.formText_1.sumOut.value=sum1*0.5;
var l = sum1*0.5;
return l;
}
function sumAll()
{
alert(sums() + sums1())
}
</script>