<select id="a" onchange="change();">
</select>
<select id="b">
</select>
<script language="javascript">
var d=document.getElementById;
var arr1=new Array();
var arr2=new Array();
var i=0;
arr1[i++]="a";
arr1[i++]="b";
arr1[i++]="c";
i=0;
arr2[i++]=new Array("a1","a2","a3");
arr2[i++]=new Array("b1","b2","b3");
arr2[i++]=new Array("c1","c2","c3");
function change(){
var id=d("a").selectedIndex;
d("b").options.length=arr2[id].length;
for(var i=0;i<arr2[id].length;i++){
  d("b").options[i]=new Option(arr2[id][i],i);
}
d("b").selectedIndex=0;
}
function initialize(){
d("a").options.length=arr1.length;
for(var i=0;i<arr1.length;i++){
  d("a").options[i]=new Option(arr1[i],i);
}
d("a").selectedIndex=0;
change();
}
initialize();
</script>