JavaScript: radio buttons validation