T=Array("BD", "BJ", "BJH", "BQ", "BR", "BRH", "BRHH"); P=Array("TWIN", "QUAD", "1", "2", "3"); A=Array("10", "15/30/30/15", "15/40/40/15", "15/30", "15/15", "15/20", "15/50/50/15", "15", "15/15/15/15", "20/60/60/20", "20/30", "20/20", "20/15", "20/50/50/20", "20", "20/20/20/20", "20/30/30/20", "20/40/40/20", "25/25/25/25", "25/25", "25", "30/20", "30/15", "30/30/30/30", "30/40/40/30", "30/50/50/30", "30/40", "30/50", "30", "30/30", "40/40/40/40", "40/50/50/40", "40", "50/50/50/50", "50/30", "50", "60", "70", "80", "90", "100", "110", "125", "150", "175", "200", "225"); V=Array("120/240", "240"); prods=Array(Array(0,0,29,0), Array(0,0,21,0), Array(0,0,22,0), Array(0,0,10,0), Array(0,0,19,0), Array(0,0,11,0), Array(0,0,12,0), Array(0,0,3,0), Array(0,0,4,0), Array(0,0,5,0), Array(0,0,26,0), Array(0,0,27,0), Array(0,0,34,0), Array(1,3,42,0), Array(1,3,43,0), Array(1,3,44,0), Array(1,3,45,0), Array(1,3,46,0), Array(1,4,42,1), Array(1,4,43,1), Array(1,4,44,1), Array(1,4,45,1), Array(1,4,46,1), Array(2,3,42,0), Array(2,3,43,0), Array(2,3,44,0), Array(2,3,45,0), Array(2,3,46,0), Array(2,4,42,1), Array(2,4,43,1), Array(2,4,44,1), Array(2,4,45,1), Array(2,4,46,1), Array(3,1,8,0), Array(3,1,15,0), Array(3,1,16,0), Array(3,1,17,0), Array(3,1,9,0), Array(3,1,18,0), Array(3,1,1,0), Array(3,1,16,0), Array(3,1,23,0), Array(3,1,24,0), Array(3,1,25,0), Array(3,1,2,0), Array(3,1,17,0), Array(3,1,30,0), Array(3,1,31,0), Array(3,1,6,0), Array(3,1,13,0), Array(3,1,33,0), Array(4,2,0,0), Array(4,2,7,0), Array(4,2,14,0), Array(4,2,20,0), Array(4,2,28,0), Array(4,2,32,0), Array(4,2,35,0), Array(4,0,4,0), Array(4,0,5,0), Array(4,2,36,0), Array(4,2,37,0), Array(4,0,12,0), Array(4,0,11,0), Array(4,3,0,0), Array(4,3,40,0), Array(4,3,41,0), Array(4,3,42,0), Array(4,3,7,0), Array(4,3,14,0), Array(4,3,20,0), Array(4,3,28,0), Array(4,3,32,0), Array(4,3,35,0), Array(4,3,36,0), Array(4,3,37,0), Array(4,3,38,0), Array(4,3,39,0), Array(4,0,29,0), Array(4,4,40,1), Array(4,4,7,1), Array(4,4,14,1), Array(4,4,28,1), Array(4,4,32,1), Array(4,4,35,1), Array(4,4,36,1), Array(4,4,37,1), Array(4,4,38,1), Array(4,4,39,1), Array(5,2,7,0), Array(5,2,14,0), Array(5,2,20,0), Array(5,2,28,0), Array(5,2,32,0), Array(5,2,35,0), Array(5,2,36,0), Array(5,2,37,0), Array(5,3,40,0), Array(5,3,41,0), Array(5,3,42,0), Array(5,3,7,0), Array(5,3,14,0), Array(5,3,20,0), Array(5,3,28,0), Array(5,3,32,0), Array(5,3,35,0), Array(5,3,36,0), Array(5,3,37,0), Array(5,3,38,0), Array(5,3,39,0), Array(5,4,40,1), Array(5,4,7,1), Array(5,4,14,1), Array(5,4,28,1), Array(5,4,32,1), Array(5,4,35,1), Array(5,4,36,1), Array(5,4,37,1), Array(5,4,38,1), Array(5,4,39,1), Array(6,3,40,0), Array(6,3,42,0)); function defselect(sbox, string) { var si = sbox.selectedIndex; for (var i = sbox.options.length - 1; i >= 0; i--) { sbox.options[i] = null; sbox.options[0] = new Option(string, 0); } sbox.options[0].selected = true; } function getSelection(sbox) { var a = Array(); var j = 0; if (sbox.options[0].selected) return a; for (i = 1; i < sbox.options.length; i++) { if (sbox.options[i].selected) { a[j++] = sbox.options[i].value; } } return a; } // a contains the ID, d contains the descriptions, E is the index function contains(a, d, is_array, e) { if (a.length == 0) return true; if (is_array) { for(j=0;j= 0; i--) sbox.options[i] = null; sbox.options[0] = new Option("All " + name + " ------", 0); sbox.options[1] = new Option("Don't Know", -1); if (orig.length == 0 || orig[0] == 0) sbox.options[0].selected = true; if (orig.length == 1 && orig[0] == -1) sbox.options[1].selected = true; for (j = 0; j < opts.length; j++) { var value = ""; sbox.options[j+2] = new Option(describe[opts[j]], describe[opts[j]]); value = describe[opts[j]]; for (x = 0; x < orig.length; x++) { if (value == orig[x]) break; } if (x != orig.length) { sbox.options[j+2].selected = true; } } } function propagate(src) { var types = document.forms["srch"].types; var poles = document.forms["srch"].poles; var amps = document.forms["srch"].amperages; var volts = document.forms["srch"].voltages; if (src == "") { types.selectedIndex = poles.selectedIndex = amps.selectedIndex = volts.selectedIndex = 0; setSelection(types, "Types", T, 0, Array(), Array(), Array(), Array(), 0); setSelection(poles, "Poles", P, 1, Array(), Array(), Array(), Array(), 0); setSelection(amps, "Amperages", A, 2, Array(), Array(), Array(), Array(), 0); setSelection(volts, "Voltages", V, 3, Array(), Array(), Array(), Array(), 0); /* setSelection(types, "Types", T, 0, Array(), Array(), Array()); defselect(poles, "All Poles ------"); defselect(amps, "All Amperages ------"); defselect(volts, "All Voltages ------"); */ } else { var sel1 = getSelection(types); var sel2 = getSelection(poles); var sel3 = getSelection(amps); var sel4 = getSelection(volts); if ((sel1.length == 1 && sel1[0] <= 0)||(sel1.length==2&&sel1[0]<=0&&sel1[1]<=0)) sel1 = Array(); if ((sel2.length == 1 && sel2[0] <= 0)||(sel2.length==2&&sel2[0]<=0&&sel2[1]<=0)) sel2 = Array(); if ((sel3.length == 1 && sel3[0] <= 0)||(sel3.length==2&&sel3[0]<=0&&sel3[1]<=0)) sel3 = Array(); if ((sel4.length == 1 && sel4[0] <= 0)||(sel4.length==2&&sel4[0]<=0&&sel4[1]<=0)) sel4 = Array(); setSelection(types, "Types", T, 0, sel1, sel2, sel3, sel4, src=="types"); setSelection(poles, "Poles", P, 1, sel1, sel2, sel3, sel4, src=="poles"); setSelection(amps, "Amperages", A, 2, sel1, sel2, sel3, sel4, src=="amperages"); setSelection(volts, "Voltages", V, 3, sel1, sel2, sel3, sel4, src=="voltages"); } } function resetsearch() { var types = document.forms["srch"].types; var poles = document.forms["srch"].poles; var amps = document.forms["srch"].amperages; var volts = document.forms["srch"].voltages; // types.selectedIndex = poles.selectedIndex = // amps.selectedIndex = volts.selectedIndex = 0; }