the problem I have with the following script was that no matter what response the result still came out as "Nope!"... any ideas?

function ques1() {
var x=document.forms['ques1'].elements['response1'];
if (x==2) {
document.forms['ques1'].elements['result1'].value="Correct!";
}
else {
document.forms['ques1'].elements['result1'].value="Nope!";
}
}