
function emptyList( box ) {
while ( box.options.length ) box.options[0] = null;
}

function fillList( box, arr ) {
for ( i = 0; i < arr[0].length; i++ ) {
option = new Option( arr[0][i], arr[1][i] );
box.options[box.length] = option;
}
box.selectedIndex=0;
}

function changeList( box ) {
list = lists[box.options[box.selectedIndex].value];
emptyList( box.form.slave );
fillList( box.form.slave, list );
}

