<script language=javascript>
var arr = new Array();
arr[0] = new Array();
arr[1] = new Array();
arr[0][0] = new Array("a", "e", "i", "o", "u", "sometimes y");
arr[0][1] = new Array("b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z");
arr[1][0] = new Array("2", "4", "6", "8", "10");
arr[1][1] = new Array("1", "3", "5", "7", "9");
function changeFirst(obj1, obj2) {
obj2.options.length = 0;
if (obj1.selectedIndex == 0) {
obj2.options[obj2.options.length] = new Option("vowels", "vowels");
obj2.options[obj2.options.length] = new Option("consonants", "consonants");
}
else {
obj2.options[obj2.options.length] = new Option("evens", "evens");
obj2.options[obj2.options.length] = new Option("odds", "odds");
}
changeSecond(obj1, obj2, document.forms["blahForm"].elements["third"]);
}
function changeSecond(obj1, obj2, obj3) {
obj3.options.length = 0;
select1 = document.forms["blahForm"].elements["first"].selectedIndex;
select2 = obj2.selectedIndex;
for (i = 0; i < arr[select1][select2].length; i++) {
obj3.options[obj3.options.length] = new Option(arr[select1][select2][i], arr[select1][select2][i]);
}
}
</script>
<body onload='changeFirst(document.forms["blahForm"].elements["first"], document.forms["blahForm"].elements["second"]);'>
<form name=blahForm>
<select name=first onchange='changeFirst(this, document.forms["blahForm"].elements["second"])'>
<option>Letters</option>
<option>Numbers</option>
</select>
<select name=second onchange='changeSecond(document.forms["blahForm"].elements["first"], this, document.forms["blahForm"].elements["third"])'></select>
<select name=third></select>
</form>
</body>