function getCheckedRadio(name) {
var radioButtons = document.getElementsByName(name);
for (var x = 0; x < radioButtons.length; x++) {
if (radioButtons[x].checked) {
return radioButtons[x].value;
}
}
return null;
}
var hit = getCheckedRadio("yourName");