click button on website

Hey guys. I have a website I need to fill out my personal info on. I have the following script to add my info into text fields:

set firstName to "Your Name" tell application "Safari" do JavaScript "document.getElementsByName('fvFirst')[0].value='" & firstName & "';" in document 1 end tell
(Thanks Craig)

I have to select my gender by clicking “male”

I don’t know the Javascript code to do so. I posted the source code from the page below if it helps anyone. Thanks so much.






got it figured out:

tell application "Safari"
	do JavaScript "document.getElementsByName('fvGender')[0].checked = true;" in document 1
end tell