<html>
<head>
<title>STEPbySTEP II</title>
<script>
function STEPbySTEPfix(name, option1, option2, option3, description)
{
this.name = name
this.option1 = option1
this.option2 = option2
this.option3 = option3
this.description = description
}
var STEPbySTEPfixes = new Array();
STEPbySTEPfixes[STEPbySTEPfixes.length] = new STEPbySTEPfix("cookingmethod", "fry", "boil", "poach", "Choose your cooking method")
STEPbySTEPfixes[STEPbySTEPfixes.length] = new STEPbySTEPfix("fry", "veg oil", "olive oil", "", "which oil are you using?")
STEPbySTEPfixes[STEPbySTEPfixes.length] = new STEPbySTEPfix("boil", "hotwater", "coldwater", "", "are you using hot or cold water")
STEPbySTEPfixes[STEPbySTEPfixes.length] = new STEPbySTEPfix("veg oil", "ok", "", "", "heat the oil very hot")
{
for (var index = 0; index < STEPbySTEPfixes.length; index++)
{
var item = STEPbySTEPfixes[index];
document.write("<div id=" + item.name + " style=\"display:none\"><table border=1 width=300><tr><td width=200>" + item.description + "</td>")
document.write("<td><input type=checkbox onclick=" + item.option1 + "></td><td><input type=checkbox onclick=" + item.option2 + "></td></tr></table>")
}
}
function showORhide(whichone)
{
if (whichone.style.display == "none") {
whichone.style.display = "block";
} else {
whichone.style.display = "none";
}
}
</script>
</head>
<body>
<table width="500" border="1"><tr>
<td width="300">Prepare a cooking pan</td>
<td width="100" align="center">Boiling<br><input type="checkbox" onclick="showORhide(fry)"></td>
<td width="100" align="center">Frying<Br><input type="checkbox" onclick="showORhide(boil)"></td>
</tr></table>
<a href="#" onclick="showORhide(fry)">START</a>
</body>
</html>