  
  function getRadioVal( radio )
  {
    var rad_val = 0;
    for (var i=0; i < radio.length; i++)
	{
	   if (radio[i].checked)
	   {
	       rad_val = radio[i].value;
	   }
	}
	return rad_val;
  }
  
  function calculate( )
  {
    var fcn = parseInt( getRadioVal( document.forms['fcn'].elements['starter'] ) )
        + parseInt( getRadioVal( document.forms['fcn'].elements['clothing'] ) )
        + parseInt( getRadioVal( document.forms['fcn'].elements['baggage'] ) )
        + parseInt( getRadioVal( document.forms['fcn'].elements['headgear'] ) );
        
    if ( parseInt( getRadioVal( document.forms['fcn'].elements['starter'] )) > 8 )
    {
        fcn += parseInt(getRadioVal(document.forms['fcn'].elements['pedals']));
    }
    else  if ( parseInt(getRadioVal(document.forms['fcn'].elements['starter'])) > 1)
    {
        fcn += parseInt(getRadioVal(document.forms['fcn'].elements['pedals'])) + 1;
    }
    if ( document.fcn.lolly.checked == 1 )
    {
        fcn += parseInt(document.fcn.lolly.value);
    }
    if ( document.fcn.trailer.checked == 1 )
    {
        fcn += parseInt(document.fcn.trailer.value);
    }
    if ( document.fcn.child.checked == 1 )
    {
        fcn += parseInt(document.fcn.child.value) * parseInt(document.fcn.numchild.value);
    }
    if ( document.fcn.beard.checked == 1 )
    {
        fcn += parseInt(document.fcn.beard.value);
    }
    if ( document.fcn.power.checked == 1 )
    {
        fcn += parseInt(document.fcn.power.value);
    }
    if ( document.fcn.aero.checked == 1 )
    {
        fcn += parseInt(document.fcn.aero.value);
    }
    document.fcn.fcnval.value = fcn;
  }