function PopulateSubs() { var colList = document.prodForm.col; // Clear out the list of teams ClearOptions(document.prodForm.size); if (colList[colList.selectedIndex].value=="Tangerine") { AddToOptionList(document.prodForm.size, "AW08-2359", "9"); AddToOptionList(document.prodForm.size, "AW08-2358", "8"); AddToOptionList(document.prodForm.size, "AW08-2357", "7"); AddToOptionList(document.prodForm.size, "AW08-2361", "Size 11"); AddToOptionList(document.prodForm.size, "AW08-2360", "Size 10"); } } function ClearOptions(OptionList) { // Always clear an option list from the last entry to the first for (x = OptionList.length; x >= 0; x = x - 1) { OptionList[x] = null; } } function AddToOptionList(OptionList, OptionValue, OptionText) { // Add option to the bottom of the list OptionList[OptionList.length] = new Option(OptionText, OptionValue); }