i'm trying to make a validation for registration form but i got a problem with gender validation using radio button in javascript..
i hope anyone can help me to solve this problem :D

here is my code 

```
function validate(form)
{
    var genderM=form.gender_male.value;
    var genderF=form.gender_female.value;

    if(genderM.checked==false && genderF.checked==false )
       {
            alert("You must select male or female");
            return false;
       }   
 }

```