/*
連動セレクトボックス
*/
select=new Array();
function item(txt,sel){
var a=new Array()
a[-1]=txt
a[-2]=sel
return a
};
function changelist(nest,list){
var formname=select[list].split(":")[0]
var box=select[list].split(":")[1].split(",")
var num=box.length
var sel=document.forms[formname].elements[box[nest+1]]
var opt=sel.options
var ar
opt.length=0
var items=eval(list)
for(var i=0;i<=nest;i++)
items=items[document.forms[formname].elements[box[i]].selectedIndex]
for(var i=0;i<items.length;i++){
ar=items[i][-1].split("|")
opt[opt.length]=new Option(ar[0],ar[ar.length==1?0:1])
if(items[i][-2])opt[opt.length-1].selected=1
};
if(sel.selectedIndex==-1)sel.selectedIndex=0;
if(nest+1<num-1)
changelist(nest+1,list);
if(document.layers){
//ねすけではリサイズが必要
top.resizeBy(-10,-10)
top.resizeBy(10,10)
}
};
function initlist(){
for(var i in select)
changelist(-1,i)
};
//window.onload=initlist;//

function go(sel){//引数:セレクトボックスオブジェクト
  var val=sel.options[sel.selectedIndex].value
  window.location.href=val
};


if (window.addEventListener) { //for FireFox
  window.addEventListener("load", initlist, false);
} else if (window.attachEvent) { //for IE
  window.attachEvent("onload", initlist);
} else  {
  window.onload = initlist;
}




