<html><head><title>Add Questions</title>

<script type="text/javascript">
<!--

function changeDiv(the_div,the_change)
{
  var the_style = getStyleObject(the_div);
  if (the_style != false)
  {
    the_style.display = the_change;
  }
}

function hideAll()
{
  changeDiv("cat_questions","none");
  changeDiv("dog_questions","none");
  changeDiv("bird_questions","none");
}

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    return document.all(objectId).style;
  } else {
    return false;
  }
}
// -->
</script>
</head>
<body>
<form name="the_form">
<h1>What sort of pet do you have?</h1>
<input type="radio" name="pet" 
	onClick="hideAll(); changeDiv('cat_questions','block');">cat
<input type="radio" name="pet" 
	onClick="hideAll(); changeDiv('dog_questions','block');">dog
<input type="radio" name="pet" 
	onClick="hideAll(); changeDiv('bird_questions','block');">bird

<input type="radio" name="pet" onClick="hideAll();">none
<p>
<div id="cat_questions" style="margin-left:30px;display:none">
Does your cat have fleas?
<input type="radio" name="fleas" value="yes">yes
<input type="radio" name="fleas" value="no">no
<br>
Does your cat like mice or fish better?
<input type="radio" name="prey" value="mice">mice
<input type="radio" name="prey" value="fish">fish

</div>

<div id="dog_questions" style="margin-left:30px;display:none;">
Does your dog bite?
<input type="radio" name="bite" value="yes">yes
<input type="radio" name="bite" value="no">no
<br>
Does your dog chase his or her tail?
<input type="radio" name="chase_tail" value="yes">yes
<input type="radio" name="chase_tail" value="no">no
</div>

<div id="bird_questions" style="margin-left:30px;display:none;">

Does your bird sing?
<input type="radio" name="sing" value="yes">yes
<input type="radio" name="sing" value="no">no
<br>
Does your bird talk?
<input type="radio" name="talk" value="yes">yes
<input type="radio" name="talk" value="no">no

</div>
<p>
Name: <input type="text" name="pet_name">
</form>

</body>
</html>