Trying to get the value of the radio box and compare it. I think Im suppose to be checking a element but not sure.

<script type="text/javascript" >
var intQuestion = Math.floor(Math.random() * 1);
var intTracker = 0;
var intAnswer = 0;

function GenQuestion()
{
switch (intQuestion)
{
case 0:
//Question
document.write("What is 1 + 1 = ? <br/>");

//Answer 1
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"1\" />");
document.write("2 <br/>");

//Answer 2
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"2\" />");
document.write("3 <br/>");

//Answer 3
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"3\" />");
document.write("4 <br/>");

//Answer 4
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"4\" />");
document.write("5 <br/>");
break;

case 1:
//Question
document.write("What is 1 + 1 = ? <br/>");

//Answer 1
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"1\" />");
document.write("2 <br/>");

//Answer 2
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"2\" />");
document.write("3 <br/>");

//Answer 3
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"3\" />");
document.write("4 <br/>");

//Answer 4
document.write("<input type=\"radio\" name=\"group1\" onclick=\"GenAnswers();\" value=\"4\" />");
document.write("5 <br/>");
break;
}
}

function GenAnswers()
{
switch (intQuestion)
{
case 0:
if(document.group1.valueOf() = 1)
alert("hit 1");
else
alert("hit 2");
break;

case 1:
if (document.group1.valueOf() = 1)
alert("hit 1");
else
alert("hit 2");
break;
}
}

//Test
GenQuestion()
</script>