function ff_which_radio()
{
  var theone = 0;
  for (var i = 0; i < ff_elements.length; i++) // test for the buttons
    if (ff_elements[i][2]=='amount')  // change name to your button group
      if (ff_getElementByIndex(i).checked) theone = i;
      // now we know which radiobutton is checked!
  
  // show the value of the button in the display field
  ff_getElementByName('display').value = ff_getElementByIndex(theone).value;

  if (ff_getElementByIndex(theone).value == 'yes') // show the field
     ff_getDivByName('textfield').style.display = 'block';
  
  if (ff_getElementByIndex(theone).value == 'no')  // hide the field
     ff_getDivByName('textfield').style.display = 'none';

}