function PopulateSubs() { var colList = document.prodForm.col; // Clear out the list of teams ClearOptions(document.prodForm.size); if (colList[colList.selectedIndex].value=="Chocolate") { AddToOptionList(document.prodForm.size, "SS09-1559", "Small"); AddToOptionList(document.prodForm.size, "SS09-1561", "Large"); AddToOptionList(document.prodForm.size, "SS09-1560", "Medium"); } if (colList[colList.selectedIndex].value=="Olive") { AddToOptionList(document.prodForm.size, "SS09-1554", "Medium"); AddToOptionList(document.prodForm.size, "SS09-1555", "Large"); AddToOptionList(document.prodForm.size, "SS09-1553", "Small"); } if (colList[colList.selectedIndex].value=="Biscuit") { AddToOptionList(document.prodForm.size, "SS09-1557", "Medium"); AddToOptionList(document.prodForm.size, "SS09-1558", "Large"); AddToOptionList(document.prodForm.size, "SS09-1556", "Small"); } if (colList[colList.selectedIndex].value=="Tangerine") { AddToOptionList(document.prodForm.size, "SS09-1548", "Medium"); AddToOptionList(document.prodForm.size, "SS09-1549", "Large"); AddToOptionList(document.prodForm.size, "SS09-1547", "Small"); } if (colList[colList.selectedIndex].value=="Fuchsia") { AddToOptionList(document.prodForm.size, "SS09-1551", "Medium"); AddToOptionList(document.prodForm.size, "SS09-1552", "Large"); AddToOptionList(document.prodForm.size, "SS09-1550", "Small"); } } 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); }