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 "NAVY BLUE/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "MAROON/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 ORANGE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "GOLD/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "DK. GREEN/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 SCARLET RED": ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "SCARLET RED/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "PURPLE/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 MAROON": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 GOLD": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 DK. GREEN": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); break; case "WHITE/3 NAVY BLUE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 KELLY GREEN": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "KELLY GREEN/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "BLACK/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 COL. BLUE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "COL. BLUE/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "ROYAL BLUE/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 ROYAL BLUE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 BLACK": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "ORANGE/3 WHITE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-11", x++); break; case "WHITE/3 PURPLE": ao(s, "SIZE 10-13 ","SIZE 10-13 ", x++); ao(s, "SIZE 8.5-11","SIZE 8.5-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;