function ao(c,txt,val,idx){ c.options[idx] = new Option(txt,val); } function setSizes(c, s){ var id; var x=0; var opt; if (!s || !c) return; if (c.selectedIndex < 1){ clearSizes(); return; } id = c.options[c.selectedIndex].value; s.options.length = 0; opt = new Option('Please select a size', ''); s.options[x++] = opt; switch(id){ case "KELLY": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "SCARLET": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "ROYAL": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "ORANGE": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "BLACK": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "MAROON": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "TEAL": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "WHITE": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "GOLD": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "CARDINAL": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "PURPLE": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "NAVY": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "GREY": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "COLUMBIA BLUE": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; case "DK. GREEN": ao(s, "(SIZE 10-13) - $3.09","(SIZE 10-13)", x++); ao(s, "(SIZE 7-9) - $2.89","(SIZE 7-9)", x++); ao(s, "(SIZE 9-11) - $2.99","(SIZE 9-11)", x++); break; } } function initSizes (){ var s, c, f=document.frmOrder; if ( !f ) return; s = f.sizes; c = f.colors; if (!c || !s) return; if (c.selectedIndex > 0){ setSizes(c, s); } else { s.options.length = 0; var opt = new Option('Please select a color first', ''); s.options[0] = opt; } } function clearSizes (){ var s, c, f=document.frmOrder; if ( !f ) return; s = f.sizes; c = f.colors; if (!c || !s) return; if (c.selectedIndex > 0) return; s.options.length = 0; var opt = new Option('Please select a color first', ''); s.options[0] = opt; } window.onload = initSizes;