//FOR ie_onchange feObj = null; feVal = null; function ie_onchange(formElement) { //THIS FUNCTION IS ASSIGNED TO ONBLUR BECAUSE IE WON'T EXECUTE ONCHANGE IF THE //SAME BAD DATA IS REENTERED VIA KEYBOARD -- DOESN'T DETECT ANYTHING HAS CHANGED. if ((IE4 || IE5) && feObj == formElement && feVal == formElement.value) { formElement.onchange(); feObj = null; feVal = null; } //if } //function function isNumber(formElement) { if (isNaN(formElement.value)) { alert("Please enter a valid number."); formElement.value = ""; thisFormEl = formElement; setTimeout("thisFormEl.focus();",1); return false; } else return true; } //function submit_window="closed"; function open_submit_window(which) { // opens/loads a new window //dir NEEDED FOR ASP STARTPAGE INCASE OF SESSION TIMEOUT if (which.indexOf("predefined") > -1) dir = "predefined"; else if (which.indexOf("userdefined") > -1) dir = "userdefined"; //USER DEFINED PROBABLY DOESN'T USE THIS ANYMORE else if (which.indexOf("semicustom") > -1) dir = "semicustom"; dc.aaa.value = "/vdac/" + which + ".asp"; submit_window="opened"; x=window.open("/vdac/pre_user/submit_frame.asp?dir=" + dir, "submit", "scrollbars,resizable,width=550,height=475"); } // function def_window="closed"; function open_def_window(which) { // opens/loads a new window def_window="opened"; y = window.open("/vdac/mod-options.htm#" + which, "def", "menubar,scrollbars,resizable,status,width=680,height=510"); y.focus(); } // function web_window="closed"; function open_web_window(which) { // opens/loads a new window web_window="opened"; z = window.open("http://www.vicorpower.com/" + which, "web", "menubar,toolbar,scrollbars,resizable,status,width=710,height=360"); z.focus(); } // function function pins_onchange() { clear_results(); } //function function baseplate_onchange() { clear_results(); } //function function baseplate_onfocus() { if (grp == 4 && dc.heatsink.selectedIndex==1) { alert("Cannot be changed with a Westcor FinMOD."); setTimeout('dc.baseplate.blur();',1); } //if "vicor1" /* WHEN ADDITIONAL HEATSINKS ARE AVAILABLE else if (dc.heatsink.selectedIndex!=0) { alert("Not an option with a heat sink."); setTimeout('dc.baseplate.blur();',1); } //if heatsink selected */ } //function function heatsink_onchange() { clear_results(); if (dc.heatsink.selectedIndex==0) { dc.baseplate.selectedIndex = 0; } if (dc.heatsink.selectedIndex==1) { dc.baseplate.selectedIndex = 4; } } //function function heatsink_onfocus() { //DON'T NEED TO SPECIFY LIMITED VIEWING YET 'CAUSE HS ONLY EXISTS FOR "grp 4" if (dc.heatsink.selectedIndex==0) { if (dc.baseplate.selectedIndex!=0) { alert("Not an option with a baseplate."); setTimeout('dc.heatsink.blur();',1); } } //if no heatsink selected } //function function label_onchange() { //IE -- FOR ie_onchange feObj = dc.label; feVal = dc.label.value; clear_results(); if (dc.label.value.indexOf("'") > -1 || dc.label.value.indexOf("\\") > -1 || dc.label.value.indexOf("\"") > -1) { alert("SORRY ...\n\nThese characters are not allowed:\n" + "- double quote ( \" )\n" + "- single quote ( \' )\n" + "- backslash ( \\ )\n"); dc.label.value = ""; setTimeout("dc.label.focus();", 1); } //if else { //IE -- IF DATA ENTERED IS OK, NO NEED TO EXECUTE //THIS ONCHANGE VIA ie_onchange ONBLUR feObj = null; feVal = null; } //else } //function function ref_onchange() { //IE -- FOR ie_onchange feObj = dc.ref; feVal = dc.ref.value; if (dc.ref.value.indexOf("'") > -1 || dc.ref.value.indexOf("\\") > -1 || dc.ref.value.indexOf("\"") > -1) { alert("SORRY ...\n\nThese characters are not allowed:\n" + "- double quote ( \" )\n" + "- single quote ( \' )\n" + "- backslash ( \\ )\n"); dc.ref.value = ""; setTimeout("dc.ref.focus();", 1); } //if else if (location.pathname.indexOf("00predef-mods.asp") > -1 || location.pathname.indexOf("semi_mech.asp") > -1) { clear_results(); //IE -- IF DATA ENTERED IS OK, NO NEED TO EXECUTE //THIS ONCHANGE VIA ie_onchange ONBLUR feObj = null; feVal = null; } //else else if (location.search.indexOf("detail") > -1 && location.pathname.indexOf("00userdef-mods.asp") > -1) { dc.changes.value = "yes"; document.but_chg.src = "/vdac/images/button_save-changes.gif"; document.but_ptno.src = "/vdac/images/button_blank.gif"; //IE -- IF DATA ENTERED IS OK, NO NEED TO EXECUTE //THIS ONCHANGE VIA ie_onchange ONBLUR feObj = null; feVal = null; } //else } //function pinOpt_ShortSolder = new Option("Short Solder","1"); pinOpt_LongSolder = new Option("Long Solder","2"); pinOpt_ShortModuMate = new Option("Short ModuMate","3"); pinOpt_LongModuMate = new Option("Long ModuMate","4"); pinOpt_ShortRoHS = new Option("Short RoHS","5"); pinOpt_LongRoHS = new Option("Long RoHS","6"); function rohs_compliance_onclick() { dc.pins.options.length = 1; //RoHS Compliance = no if (dc.rohs_compliance[0].checked == true) { dc.pins.options[1] = pinOpt_ShortSolder; dc.pins.options[2] = pinOpt_LongSolder; dc.pins.options[3] = pinOpt_ShortModuMate; dc.pins.options[4] = pinOpt_LongModuMate; dc.pins.options.length = 5; } //RoHS Compliance = yes if (dc.rohs_compliance[1].checked == true) { dc.pins.options[1] = pinOpt_ShortRoHS; dc.pins.options[2] = pinOpt_LongRoHS; dc.pins.options.length = 3; } dc.pins.selectedIndex = 0; if (location.pathname.indexOf("00predef-mods.asp") > -1) { clear_results(); } if (location.pathname.indexOf("semi_mech.asp") > -1) { if (semicustom_page_loaded) clear_results(); } if (location.pathname.indexOf("00userdef-mods.asp") > -1) { clear_results("mech"); } //if usercon } //function function file_onunload() { // page's onUnload if (submit_window=="opened" && x.closed==false) x.close(); if (def_window=="opened" && y.closed==false) y.close(); if (web_window=="opened" && z.closed==false) z.close(); } //function function noaction(e) { if (IE4 || IE5) { e = window.event; elname = e.srcElement.name; } if (NS4 || NS6) { elname = e.target.name; } if (e.type == "mousedown") { return false; } //BEST FOR NS6 if (e.type == "focus") { eval("dc." + elname + ".blur()"); setTimeout("dc." + elname + ".blur();",1); } //BEST FOR NS6 } //function function disable_elements() { //CALLED IN file_onload() for (i=0; i function no_drag_drop() { //IE4 && IE5 ONLY, INITIALIZED IN FILE_ONLOAD window.event.returnValue = false; } //function function get_query(q_name) { allqueries = location.search.substring(1); pos = allqueries.indexOf(q_name + "="); if (pos > -1) { start = pos + q_name.length + 1; end = allqueries.indexOf("&",start); if (end == -1) end = allqueries.length; q_value = allqueries.substring(start,end); q_value = unescape(q_value); } else { q_value = ""; } } // function function file_onload() { dc = document.configurator; //PREVENTS DRAGGING AND DROPPING ANY TEXT INTO DISABLED TEXT BOXES if (IE4 || IE5) document.ondragstart = no_drag_drop; if (grp != 4) { // dc.pins.options.length = 3; // ALL PINS NOW VISIBLE TO ALL if (dc.baseplate) dc.baseplate.options.length = 4; } //DISABLES TAB KEY FOR IE if (IE4 || IE5) document.onkeydown = ie_keydown; function ie_keydown() { if (event.keyCode == 9) event.returnValue=false; } if (location.pathname.indexOf("00predef-mods.asp") > -1) { //locSrch DEFINED IN 00predef-mods.asp, END OF FILE if (locSrch == "" || locSrch.indexOf("upc") > -1) dc.Vout.options.length = 1; nono = new Array("price","delivery","ptno"); //output_words has onblur disable_elements(); //Vin COMING FROM UPC //upc DEFINED IN 00predef-mods.asp, END OF FILE if (upc != "") { for (i=0; i -1) { nono = new Array("price","delivery","ptno"); //output_words has onblur disable_elements(); if (pins_code == "5" || pins_code == "6") { dc.rohs_compliance[1].checked = true; rohs_compliance_onclick(); } for (i=0; i -1) { if (location.search.indexOf("detail") > -1) { if (dc.ptno.value == "") { document.but_ptno.src = "/vdac/images/button_ptno.gif"; } document.but_chg.src = "/vdac/images/button_blank.gif"; dc.changes.value = "no"; } if (location.search.indexOf("detail") < 0) { document.but_chg.src = "/vdac/images/button_feasibility.gif"; } //if (grp != 4) dc.productgrade.options.length = 4; // M-GRADE NOW VISIBLE TO ALL if (NS4) { if (dc.ptno.type == "hidden") dc.ptno.value = ""; } //NETSCAPE BUG dc.page_loaded.value = "yes"; nono = new Array("vin_ll_min","vin_ll_max","vin_hl_min","vin_hl_max","vout_setpoint_min","vout_setpoint_max","micro_modqty","micro_min","micro_max","mini_modqty","mini_min","mini_max","maxi_modqty","maxi_min","maxi_max","feas","price","delivery","ptno"); disable_elements(); } //if userdef } // function