function ff_which_radio()
{
var theone = 0;
    for (var i = 0; i < ff_elements.length; i++)
        if (ff_elements[i][2]=='amount') 
            if (ff_getElementByIndex(i).checked) theone = i;

ff_getElementByName('selected').value = ff_getElementByIndex(theone).value ;
}