I am making a Radica 20Q(one of those things that tries to guess what you're thinking in 30 questions or less) of my own and I was wondering if anyone out there who knows how to make one. My problem is with the if statements... HELP ME!

My current code is as follows:
Code:
<html>
<head>
<title></title>
</head>

<body bgcolor="black" text="lime">
<center><input type="text" readonly name="box" id="T" size="30" style="background-color:#AA0000; color:red; font-family:verdana; font-size:16">
<p>
<input type="button" name="yes" value="YES" onclick="rad3('yes')" disabled>
<input type="button" name="ok" value="OK" onclick="rad3('ok');this.disabled=true">
<input type="button" name="no" value="NO" onclick="rad3('no')" disabled>
</center>

<script>
var Y=new Object();
var Msg="Think of something..."; Repeat();
var i=0;
var ilngth=0;
var j=0;
var num=0;
var tm=null;
var Qnum=0;
var retyes=new Array(false,false,false,false,false);
var retno=new Array(false,false,false,false,false);

function rad3(btn)
{	
	Qnum++;
 	if (btn=='ok')
	{
		Msg="Q"+Qnum+": Is it about computer programming?";
	}

	Repeat();
	yes.disabled=false;
	no.disabled=false;
	if (btn=='yes'||(retyes[0]&&!retno[0]))
	{
		retyes[0]=true;
		Msg="Q"+Qnum+": Is it about the class?";
		Repeat();
		if(btn=='yes'||retyes[1])
		{
			retyes[1]=true;
			Msg="Q"+Qnum+": Is it a person in the class?";
			Repeat();
			if(btn=='yes'||retyes[2])
			{
				retyes[2]=true;
				Msg="Q"+Qnum+": Are they important?";
				Repeat();
			}
			else if(btn=='no'||retno[2])
			{
				retno[2]=true;
				Msg="Q"+Qnum+": Is it a guy?";
				Repeat();
			}
		}
		else if(btn=='no'||(retno[1]&&!retyes[0]))
		{
			Msg="Q"+Qnum+": Is it a person?";
			Repeat();
		}
	}
	else if(btn=='no'||retno[0])
	{
		retno[1]=true;
		Msg="Q"+Qnum+": Is it  a person?";
		Repeat();
		if(btn=='yes')
		{
			Msg="Q"+Qnum+": Is it cool?";
			Repeat();
		}
		else if(btn=='no')
		{
			Msg="Q"+Qnum+": Does it have feet?";
			Repeat();
		}
	}
}

function Repeat()
{
	clearInterval(tm);
	Msg="                                             "+Msg;
	Msg+=Msg;
	i=0;
	tm=setInterval('S()',150);
}