<script language="javascript">

var arr1 = new Array("Select County", "Bay", "Bradford", "Baker", "Brevard", "Broward");

var arr2 = new Array("Select County", "CACounty1", "CACounty2", "CACounty3", "CACounty4", "CACounty5");

var arr3 = new Array("Select County", "AZCounty1", "AZCounty2", "AZCounty3", "AZCounty4", "AZCounty5");

var arr4 = new Array("Select County", "NYCounty1", "NYCounty2", "NYCounty3", "NYCounty4", "NYCounty5");

var arr5 = new Array("Select County", "NJCounty1", "NJCounty2", "NJCounty3", "NJCounty4", "NJCounty5");

var arr6 = new Array("Select County", "MECounty1", "MECounty2", "MECounty3", "MECounty4", "MECounty5");

var arr7 = new Array("Select Type of Study", "Study 1", "Study 2");

var arr8 = new Array("Select Type of Study", "Study 3", "Study 4");

var arr9 = new Array("Select Type of Study", "Study 5", "Study 6");

var arr10 = new Array("Select Type of Study", "Study 7", "Study 8");

var arr11 = new Array("Select Type of Study", "Study 9", "Study 10");

var arr12 = new Array("Select Type of Study", "Study 11", "Study 12");

var arr13 = new Array("Select Type of Study", "Study 13", "Study 14");

var arr14 = new Array("Select Type of Study", "Study 15", "Study 16");

var arr15 = new Array("Select Type of Study", "Study 17", "Study 18");

var arr16 = new Array("Select Type of Study", "Study 19", "Study 20");

var arr17 = new Array("Select Type of Study", "Study 21", "Study 22");

var arr18 = new Array("Select Type of Study", "Study 23", "Study 24");

var arr19 = new Array("Select Type of Study", "Study 25", "Study 26");

var arr20 = new Array("Select Type of Study", "Study 27", "Study 28");

var arr21 = new Array("Select Type of Study", "Study 29", "Study 30");

functionloadit(junk){

if(junk == 'State1'){

for(vari = 0; i < arr1.length; i++){

document.theform.select2.options[i] = new Option(arr1[i], arr1[i]);

if (i==0){

document.theform.select3.options[i] = new Option(arr4[0], arr4[0]);

}

}

}

else if(junk =='State2'){

for(vari = 0; i < arr2.length; i++){

document.theform.select2.options[i] = new Option(arr2[i], arr2[i]);

if (i==0){

document.theform.select3.options[i] = new Option(arr7[0], arr7[0]);

}

}

}

else if(junk =='State3'){

for(vari = 0; i < arr3.length; i++){

document.theform.select2.options[i] = new Option(arr3[i], arr3[i]);

if (i==0){

document.theform.select3.options[i] = new Option(arr10[0], arr10[0]);

}

}

else if(junk =='State4'){

for(vari = 0; i < arr2.length; i++){

document.theform.select2.options[i] = new Option(arr4[i], arr4[i]);

if (i==0){

document.theform.select3.options[i] = new Option(arr7[0], arr7[0]);

}

}

}

else if(junk =='State5'){

for(vari = 0; i < arr3.length; i++){

document.theform.select2.options[i] = new Option(arr5[i], arr5[i]);

if (i==0){

document.theform.select3.options[i] = new Option(arr10[0], arr10[0]);

}

}

else if(junk =='State6'){

for(vari = 0; i < arr3.length; i++){

document.theform.select2.options[i] = new Option(arr6[i], arr6[i]);

if (i==0){

document.theform.select3.options[i] = new Option(arr10[0], arr10[0]);

}

}

} else if(junk == 'thing1'){

for(vari = 0; i < arr4.length; i++){

document.theform.select3.options[i] = new Option(arr7[i], arr7[i]);

}

}

else if(junk =='thing2'){

for(vari = 0; i < arr5.length; i++){

document.theform.select3.options[i] = new Option(arr5[i], arr5[i]);

}

}

else if(junk =='thing3'){

for(vari = 0; i < arr6.length; i++){

document.theform.select3.options[i] = new Option(arr6[i], arr6[i]);

}

} else if(junk == 'blah1'){

for(vari = 0; i < arr7.length; i++){

document.theform.select3.options[i] = new Option(arr7[i], arr7[i]);

}

}

else if(junk =='blah2'){

for(vari = 0; i < arr8.length; i++){

document.theform.select3.options[i] = new Option(arr8[i], arr8[i]);

}

}

else if(junk =='blah3'){

for(vari = 0; i < arr9.length; i++){

document.theform.select3.options[i] = new Option(arr9[i], arr9[i]);

}

}elseif(junk == 'junk1'){

for(vari = 0; i < arr10.length; i++){

document.theform.select3.options[i] = new Option(arr10[i], arr10[i]);

}

}

else if(junk =='junk2'){

for(vari = 0; i < arr11.length; i++){

document.theform.select3.options[i] = new Option(arr11[i], arr11[i]);

}

}

else if(junk =='junk3'){

for(vari = 0; i < arr12.length; i++){

document.theform.select3.options[i] = new Option(arr12[i], arr12[i]);

}

}

} else if(junk == 'thing1'){

for(vari = 0; i < arr4.length; i++){

document.theform.select3.options[i] = new Option(arr4[i], arr4[i]);

}

}

else if(junk =='thing2'){

for(vari = 0; i < arr5.length; i++){

document.theform.select3.options[i] = new Option(arr5[i], arr5[i]);

}

}

else if(junk =='thing3'){

for(vari = 0; i < arr6.length; i++){

document.theform.select3.options[i] = new Option(arr6[i], arr6[i]);

}

} else if(junk == 'blah1'){

for(vari = 0; i < arr7.length; i++){

document.theform.select3.options[i] = new Option(arr7[i], arr7[i]);

}

}

else if(junk =='blah2'){

for(vari = 0; i < arr8.length; i++){

document.theform.select3.options[i] = new Option(arr8[i], arr8[i]);

}

}

else if(junk =='blah3'){

for(vari = 0; i < arr9.length; i++){

document.theform.select3.options[i] = new Option(arr9[i], arr9[i]);

}

}elseif(junk == 'junk1'){

for(vari = 0; i < arr10.length; i++){

document.theform.select3.options[i] = new Option(arr10[i], arr10[i]);

}

}

else if(junk =='junk2'){

for(vari = 0; i < arr11.length; i++){

document.theform.select3.options[i] = new Option(arr11[i], arr11[i]);

}

}

else if(junk =='junk3'){

for(vari = 0; i < arr12.length; i++){

document.theform.select3.options[i] = new Option(arr12[i], arr12[i]);

}

}

} else if(junk == 'thing1'){

for(vari = 0; i < arr4.length; i++){

document.theform.select3.options[i] = new Option(arr4[i], arr4[i]);

}

}

else if(junk =='thing2'){

for(vari = 0; i < arr5.length; i++){

document.theform.select3.options[i] = new Option(arr5[i], arr5[i]);

}

}

else if(junk =='thing3'){

for(vari = 0; i < arr6.length; i++){

document.theform.select3.options[i] = new Option(arr6[i], arr6[i]);

}

} else if(junk == 'blah1'){

for(vari = 0; i < arr7.length; i++){

document.theform.select3.options[i] = new Option(arr7[i], arr7[i]);

}

}

else if(junk =='blah2'){

for(vari = 0; i < arr8.length; i++){

document.theform.select3.options[i] = new Option(arr8[i], arr8[i]);

}

}

else if(junk =='blah3'){

for(vari = 0; i < arr9.length; i++){

document.theform.select3.options[i] = new Option(arr9[i], arr9[i]);

}

}elseif(junk == 'junk1'){

for(vari = 0; i < arr10.length; i++){

document.theform.select3.options[i] = new Option(arr10[i], arr10[i]);

}

}

else if(junk =='junk2'){

for(vari = 0; i < arr11.length; i++){

document.theform.select3.options[i] = new Option(arr11[i], arr11[i]);

}

}

else if(junk =='junk3'){

for(vari = 0; i < arr12.length; i++){

document.theform.select3.options[i] = new Option(arr12[i], arr12[i]);

}

}

}elseif(junk == 'junk1'){

for(vari = 0; i < arr10.length; i++){

document.theform.select3.options[i] = new Option(arr10[i], arr10[i]);

}

}

else if(junk =='junk2'){

for(vari = 0; i < arr11.length; i++){

document.theform.select3.options[i] = new Option(arr11[i], arr11[i]);

}

}

else if(junk =='junk3'){

for(vari = 0; i < arr12.length; i++){

document.theform.select3.options[i] = new Option(arr12[i], arr12[i]);

}

}

//alert(document.theform.select3.value+" "+ document.theform.select2.value+" "+document.theform.thing .value)

}

</script>

<title>JavaScript testing grounds</title>

<form name="theform" id="theform">

<select name="thing" id="thing" onChange="loadit(this.value);">

<option value="Select State">Select State</option>

<option value="State1">Florida</option>

<option value="State2">California</option>

<option value="State3">Arizona</option>

<option value="State4">New York</option>

<option value="State5">New Jersey</option>

<option value="State6">Maine</option>

</select>

<select name="select2" id="select2" onChange="loadit(this.value);">

<option value="FLCounty1">Select County</option>

<option value="FLCounty2">Bay</option>

<option value="FLCounty3">Bradford</option>

<option value="FLCounty4">Baker</option>

<option value="FLCounty5">Brevard</option>

<option value="FLCounty6">Broward</option>

</select>

<select name="select3" id="select3" onChange="loadit(this.value);">

<option value="Study Type">Select Type of Study </option>

<option value="Study Type">Study 1</option>

<option value="Study Type">Study 2</option>

</select>

<input type ="button" name ="Go1" value ="Go" >

<br

</form>