As the article you linked to mentions, a server side solution is preferable if it's important to you that all
users get to see the age check.
Anyway, if I understand you correctly, your problem is that you don't know how to use a year of birth selector to calculate the current age? First of all, that's pretty flawed. If you're not letting users enter their actual birthday, but only a year, you have to choose between either keeping some 21-year-olds out or letting some 20-year-olds in.
If you still want to do it that way, all you need to know about is Date objects: https://developer.mozilla.org/en/Jav...l_Objects/Date