I am not really sure about Javascript, but I know in VBScript, a radio button that is clicked returns the value in "Value" For eg, if first button is clicked, mselect would be equal to r0. Therefore, you should check what mselect.value is equal to.