I am completely new to JS so please bare with me!!!

I need to capture time and time of day..I have a textbox for the time and am using 2 radio buttons. One for AM and one for PM.

I want to make sure that one of the radio buttons is checked...

This doesn't work.... Please HELP!!!!

if (!document.form1.rdampm == 0)
{
alert("Time of day checkbox must be checked");
return false;}


This is for the AM:
<input type="radio" id="rdampm" name="rdampm<%=salesArray(0,i)%>" value="0" <%if salesArray(12,i)=False then Response.Write("checked")%>>AM

This is for PM:
<input type="radio" id="rdampm" name="rdampm<%=salesArray(0,i)%>" value="1" <%if salesArray(12,i)=False then Response.Write("checked")%>>PM