var tempOBJ = eval("document.selFORM.rate"+codeNum+".options");
// the right side pull-down menu
tempOBJ.options.length = 0; // set the length
of the pull-down menu
tempOBJ.options[0] = new Option('bitrate','-1');
// set the name of first item of the right side pull-down menu
tempOBJ.options[0].selected = true; // set the status
of first item to be selected
var bak = 1;
if( modeNum == '-1' ) { // no mode is selected
tempOBJ.options[0] = new Option('-','-1');
// if mode is not selected, rewrite the name of first item
} else {
for (k = beginArray[modeNum-1]; k <
beginArray[modeNum]; k++) {
tempOBJ.options[bak] = new
Option(rateArray[k], bak++); // add a item to the pull-down menu
}
}
}