function datasheet() { if (dc.modPkgSize.selectedIndex == 0) { alert("First, please be sure\nthese items are selected:\n\n" + "- Input Voltage\n" + "- Output Voltage\n" + "- Output Power/Current\n" + "- Module Package"); } //if else { selected_text("Vin"); mod_vin = dc.temporary.value; mod = ""; if (dc.modsize.value == "maxi") mod = "maxi"; else if (dc.modsize.value == "mini") mod = "mini"; else if (dc.modsize.value == "micro") mod = "micro"; datasheet_link = "documents/datasheets/ds_" + mod_vin + "vin-" + mod + "-family.pdf" open_web_window(datasheet_link); } //else } //function /* //--------FUNCTION----------------------------------------- function recalculate_outputpower() { selected_text('Vin'); opts_index = 1; Wout = 1; for (vo=0; vo function Vout_options() { // part of Vin_onchange() selected_text('Vin'); opts_index = 1; Wout = 1; for (vo=0; vo function outputpower(modsize,modmax) { this.modsize = modsize // max power for mini module this.modmax = modmax // max power for maxi module } function define_outputpower() { selected_text('Vin'); selected_text('Vout'); Wout = parseFloat(dc.Wout.value); quals = null; quals = new Array(); quals_index = 0; for (i=0; i function Vin_onchange() { clear_results(); dc.Vout.selectedIndex = 0; clear_AWout(); if (dc.Vin.selectedIndex == 0) { dc.Vout.options.length = 1; } else { Vout_options(); valVin = parseFloat(dc.Vin.options[dc.Vin.selectedIndex].value); if (valVin == 28) { pgArray = new Array('C','T','H','M'); } //else if (valVin == 150) { // pgArray = new Array('C'); //} else { pgArray = new Array('E','C','T','H','M'); } productgrade_options(pgArray); } //else } //function function productgrade_options(pg) { dc.productgrade.length = 1; for (i=0; i function Vout_onfocus() { if (dc.Vin.selectedIndex==0) { alert("Please select input voltage first."); setTimeout('dc.Vin.focus();',1); } } //function function Vout_onchange() { clear_results(); clear_AWout(); } //function function selected_text(item) { frmObj = eval("dc." + item); txt = frmObj.options[frmObj.selectedIndex].text; if (item == "Vin") { txt = frmObj.options[frmObj.selectedIndex].value; Vin = txt; } if (item == "Vout") { txt = frmObj.options[frmObj.selectedIndex].value; Vout = txt; } if (item=="productgrade") productgrade = txt; if (item=="pins") pins = txt; if (item=="baseplate") baseplate = txt; if (item=="heatsink") heatsink = txt; dc.temporary.value = txt; } //function function WAout_onfocus() { // onFocus for Wout and Aout if (dc.Vin.selectedIndex==0) { alert("Please select input voltage first."); setTimeout("dc.Vin.focus();",1); } else if (dc.Vout.selectedIndex==0) { alert("Please select output voltage first."); setTimeout("dc.Vout.focus();",1); } } //function function calcWatts() { // onChange for Aout //IE -- FOR ie_onchange feObj = dc.Aout; feVal = dc.Aout.value; if (isNumber(dc.Aout)) { if (dc.Aout.value=="") { clear_AWout(); } else if (dc.Aout.value <= 0) { alert("Please enter a number greater than zero."); clear_AWout(); setTimeout("dc.Aout.focus();",1); } else { clear_modPkgSize(); clear_results(); selected_text('Vout'); dc.Wout.value = Math.round(Vout * dc.Aout.value); define_outputpower(); module_results(); //IE -- IF DATA ENTERED IS OK, NO NEED TO EXECUTE //THIS ONCHANGE VIA ie_onchange ONBLUR feObj = null; feVal = null; } //else } //if isNumber else { //NOT A NUMBER clear_AWout(); } } //function function calcAmps() { // onChange for Wout //IE -- FOR ie_onchange feObj = dc.Wout; feVal = dc.Wout.value; if (isNumber(dc.Wout)) { if (dc.Wout.value=="") { clear_AWout(); } else if (dc.Wout.value <= 0) { alert("Please enter a number greater than zero."); clear_AWout(); setTimeout("dc.Wout.focus();",1); } else { clear_modPkgSize(); clear_results(); define_outputpower(); xxx = dc.Wout.value / Vout; dc.Aout.value = Math.round(xxx * 10) / 10; module_results(); //IE -- IF DATA ENTERED IS OK, NO NEED TO EXECUTE //THIS ONCHANGE VIA ie_onchange ONBLUR feObj = null; feVal = null; } // else } //if isNumber else { //NOT A NUMBER clear_AWout(); } } // function function module_results() { //alert(quals.join('\n')); dc.modPkgSize.options.length = 1; for (i=0; i 1) { mods = "modules"; } else { mods = "module"; } optVal = optModSize + '_' + optModPout + '_' + optModQty; optTxt = optModQty + " x " + optModPout + "W " + UCmod + " " + mods; dc.modPkgSize.options[i+1] = new Option(optTxt,optVal); } //for if (dc.modPkgSize.options.length == 2) { dc.modPkgSize.selectedIndex = 1; dc.modPkgSize.onchange(); } } // function function modPkgSize_onfocus() { if (dc.Vin.selectedIndex == 0) { alert("First please select input voltage."); setTimeout('dc.Vin.focus();',1); } else if (dc.Vout.selectedIndex == 0) { alert("First please select output voltage."); setTimeout('dc.Vout.focus();',1); } else if (dc.Wout.value == "") { alert("First please enter output power."); setTimeout('dc.Wout.focus();',1); } } //function function modPkgSize_onchange() { clear_results(); if (dc.modPkgSize.selectedIndex == 0) { clear_modPkgSize(); } else { strVal = dc.modPkgSize.options[dc.modPkgSize.selectedIndex].value arrVal = strVal.split('_'); dc.modsize.value = arrVal[0]; dc.modmax.value = arrVal[1]; dc.modqty.value = arrVal[2]; document.getElementById('dtshtLink').style.color = "#336699"; document.getElementById('dtshtLink').style.cursor = "pointer"; } } //function function productgrade_onchange() { clear_results(); } //function function label_onfocus() { if (FAL == 0) { alert('SORRY ...\n\nGuest users do not have access to custom features.\nClick "Register" above to access these features.'); setTimeout("dc.label.blur();",1); } } //function function request(req) { if (req == "price" && dc.price.value != "") alert("Please reconfigure module before\nrequesting new price and delivery."); else if (req == "ptno" && dc.ptno.value != "") alert("Please reconfigure module before\nrequesting a new part number."); else if (dc.Vin.selectedIndex==0) { alert("First please select Input Voltage."); dc.Vin.focus(); } else if (dc.Vout.selectedIndex==0) { alert("First please select Output Voltage."); dc.Vout.focus(); } else if (dc.Wout.value=="") { alert("First please enter Output Power or Current."); dc.Wout.focus(); } else if (dc.modPkgSize.selectedIndex==0) { alert("First please select Module Package."); dc.modPkgSize.focus(); } else if (dc.productgrade.selectedIndex==0) { alert("First please select Product Grade."); dc.productgrade.focus(); } else if (dc.pins.selectedIndex==0) { alert("First please select Pin Style."); dc.pins.focus(); } else if (dc.baseplate.selectedIndex==0) { alert("First please select Baseplate Style."); dc.baseplate.focus(); } else { //else1 if (req == "ptno") { //ptno, price, and delivery dc.request.value = "ptno"; } else if (req == "price") { //price and delivery only dc.request.value = "price"; } else if (req == "saveDesign") { //price and delivery only dc.request.value = "saveDesign"; } open_submit_window('predefined/request_submit'); } //else1 } //function function place_order() { if (dc.Vin.selectedIndex==0) { alert("First please select Input Voltage."); setTimeout("dc.Vin.focus();",1); } else if (dc.Vout.selectedIndex==0) { alert("First please select Output Voltage."); setTimeout("dc.Vout.focus();",1); } else if (dc.Wout.value=="") { alert("First please enter Output Power or Current."); setTimeout("dc.Wout.focus();",1); } else if (dc.productgrade.selectedIndex==0) { alert("First please select Product Grade."); setTimeout("dc.productgrade.focus();",1); } else if (dc.pins.selectedIndex==0) { alert("First please select Pin Style."); setTimeout("dc.pins.focus();",1); } else if (dc.baseplate.selectedIndex==0) { alert("First please select Baseplate Style."); setTimeout("dc.baseplate.focus();",1); } else if (dc.ptno.value == "") { alert('First please Get Part Number.\n(Click on the "Get Part Number" button above.)'); } else { pn = dc.ptno.value; id = dc.id.value; location = "/vdac/accounts/orderform.asp?detail=" + pn + "&config=predefined" + "&id=" + id + "&reqpg=orderform1"; } //else } //function function clear_AWout() { dc.Wout.value = ""; dc.Aout.value = ""; clear_modPkgSize(); } //function function clear_modPkgSize() { dc.modPkgSize.selectedIndex = 0; dc.modsize.value = ''; dc.modmax.value = ''; dc.modqty.value = ''; document.getElementById('dtshtLink').style.color = "#dddddd"; document.getElementById('dtshtLink').style.cursor = "default"; } //function function clear_results() { dc.ptno.value = ""; dc.price.value = ""; dc.delivery.value = ""; dc.id.value = ""; //DESIGN ID } //function function reset_button() { dc.reset(); } // function