
/////////////////////////////////////////////////////////////////////////
/////////// Calculates Total Wattage for System Configuration///////////
///////////////////////////////////////////////////////////////////////

function ServerModule(model) {

var a=model;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4200 with 110V and 1 SIM]
case 0: max1=0; idle1=91.3;
break;
// Case of 250GB SATA HDD [J4200 with 110V and 1 SIM]
case 1: 
max1=253.3;
idle1=213;
break;
// Case of 500GB SATA HDD [J4200 with 110V and 1 SIM]
case 2: 
max1=265.1;
idle1=214.99;
break;
// Case of 750GB SATA HDD [J4200 with 110V and 1 SIM]
case 3: 
max1=273.3;
idle1=233.3;
break;
// Case of 1TB SATA HDD [J4200 with 110V and 1 SIM]
case 4: 
max1=318;
idle1=235;
break;
// Case of 73GB SAS HDD [J4200 with 110V and 1 SIM]
case 5: 
max1=274;
idle1=250;
break;
// Case of 146GB SAS HDD [J4200 with 110V and 1 SIM]
case 6: 
max1=288.2;
idle1=273.9;
break;
// Case of 300GB SAS HDD [J4200 with 110V and 1 SIM]
case 7: 
max1=354;
idle1=317;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)

}

function ServerModule2(model2) {

var a=model2;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4200 with 110V and 2 SIMs]
case 0: max1=0; idle1=97.5;
break;
// Case of 250GB SATA HDD [J4200 with 110V and 2 SIMs]
case 1: 
max1=267.3;
idle1=222.7;
break;
// Case of 500GB SATA HDD [J4200 with 110V and 2 SIMs]
case 2: 
max1=274.1;
idle1=223;
break;
// Case of 750GB SATA HDD [J4200 with 110V and 2 SIMs]
case 3: 
max1=287.3;
idle1=263.6;
break;
// Case of 1TB SATA HDD [J4200 with 110V and 2 SIMs]
case 4: 
max1=320;
idle1=243;
break;
// Case of 73GB SAS HDD [J4200 with 110V and 2 SIMs]
case 5: 
max1=283;
idle1=259;
break;
// Case of 146GB SAS HDD [J4200 with 110V and 2 SIMs]
case 6: 
max1=298.8;
idle1=283.1;
break;
// Case of 300GB SAS HDD [J4200 with 110V and 2 SIMs]
case 7: 
max1=359;
idle1=325;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}

function ServerModule3(model3) {

var a=model3;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4200 with 220V and 1 SIM]
case 0: max1=0; idle1=90;
break;
// Case of 250GB SATA HDD [J4200 with 220V and 1 SIM]
case 1: 
max1=253.2;
idle1=208;
break;
// Case of 500GB SATA HDD [J4200 with 220V and 1 SIM]
case 2: 
max1=261;
idle1=225.9;
break;
// Case of 750GB SATA HDD [J4200 with 220V and 1 SIM]
case 3: 
max1=273.1;
idle1=250;
break;
// Case of 1TB SATA HDD [J4200 with 220V and 1 SIM]
case 4: 
max1=315;
idle1=230;
break;
// Case of 73GB SAS HDD [J4200 with 220V and 1 SIM]
case 5: 
max1=270;
idle1=246;
break;
// Case of 146GB SAS HDD [J4200 with 220V and 1 SIM]
case 6: 
max1=284.4;
idle1=270.4;
break;
// Case of 300GB SAS HDD [J4200 with 220V and 1 SIM]
case 7: 
max1=343;
idle1=313;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}

function ServerModule4(model4) {

var a=model4;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4200 with 220V and 2 SIMs]
case 0: max1=0; idle1=96;
break;
// Case of 250GB SATA HDD [J4200 with 220V and 2 SIMs]
case 1: 
max1=262.9;
idle1=218.6;
break;
// Case of 500GB SATA HDD [J4200 with 220V and 2 SIMs]
case 2: 
max1=267.1;
idle1=234.5;
break;
// Case of 750GB SATA HDD [J4200 with 220V and 2 SIMs]
case 3: 
max1=283.1;
idle1=258.6;
break;
// Case of 1TB SATA HDD [J4200 with 220V and 2 SIMs]
case 4: 
max1=316;
idle1=240;
break;
// Case of 73GB SAS HDD [J4200 with 220V and 2 SIMs]
case 5: 
max1=278;
idle1=255;
break;
// Case of 146GB SAS HDD [J4200 with 220V and 2 SIMs]
case 6: 
max1=292.1;
idle1=278.3;
break;
// Case of 300GB SAS HDD [J4200 with 220V and 2 SIMs]
case 7: 
max1=352;
idle1=320;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}

function ServerModule5(model5) {

var a=model5;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4400 with 110V and 1 SIM]
case 0: max1=0; idle1=97;
break;
// Case of 500GB SATA HDD [J4400 with 110V and 1 SIM]
case 1: 
max1=429.8;
idle1=379.1;
break;
// Case of 750GB SATA HDD [J4400 with 110V and 1 SIM]
case 2: 
max1=460.6;
idle1=382;
break;
// Case of 1TB SATA HDD [J4400 with 110V and 1 SIM]
case 3: 
max1=547.3;
idle1=388.3;
break;
// Case of 73GB SAS HDD [J4400 with 110V and 1 SIM]
case 4: 
max1=464;
idle1=414;
break;
// Case of 146GB SAS HDD [J4400 with 110V and 1 SIM]
case 5: 
max1=474.1;
idle1=463.4;
break;
// Case of 300GB SAS HDD [J4400 with 110V and 1 SIM]
case 6: 
max1=595;
idle1=525;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}


function ServerModule6(model6) {

var a=model6;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4400 with 110V and 2 SIMs]
case 0: max1=0; idle1=107;
break;
// Case of 500GB SATA HDD [J4400 with 110V and 2 SIMs]
case 1: 
max1=442.6;
idle1=431.6;
break;
// Case of 750GB SATA HDD [J4400 with 110V and 2 SIMs]
case 2: 
max1=483.9;
idle1=418;
break;
// Case of 1TB SATA HDD [J4400 with 110V and 2 SIMs]
case 3: 
max1=546.7;
idle1=398.1;
break;
// Case of 73GB SAS HDD [J4400 with 110V and 2 SIMs]
case 4: 
max1=480;
idle1=434;
break;
// Case of 146GB SAS HDD [J4400 with 110V and 2 SIMs]
case 5: 
max1=491.1;
idle1=484.8;
break;
// Case of 300GB SAS HDD [J4400 with 110V and 2 SIMs]
case 6: 
max1=609;
idle1=540;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}

function ServerModule7(model7) {

var a=model7;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4400 with 220V and 1 SIM]
case 0: max1=0; idle1=95.5;
break;
// Case of 500GB SATA HDD [J4400 with 220V and 1 SIM]
case 1: 
max1=419.5;
idle1=373.6;
break;
// Case of 750GB SATA HDD [J4400 with 220V and 1 SIM]
case 2: 
max1=450.1;
idle1=381;
break;
// Case of 1TB SATA HDD [J4400 with 220V and 1 SIM]
case 3: 
max1=532;
idle1=378.8;
break;
// Case of 73GB SAS HDD [J4400 with 220V and 1 SIM]
case 4: 
max1=453;
idle1=405;
break;
// Case of 146GB SAS HDD [J4400 with 22V and 1 SIM]
case 5: 
max1=466.1;
idle1=452.7;
break;
// Case of 300GB SAS HDD [J4400 with 220V and 1 SIM]
case 6: 
max1=578;
idle1=515;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}

function ServerModule8(model8) {

var a=model8;

var max1=0;
var idle1=0;

switch (a) {
// Case of NO HDDs [J4400 with 220V and 2 SIMs]
case 0: max1=0; idle1=105;
break;
// Case of 500GB SATA HDD [J4400 with 220V and 2 SIMs]
case 1: 
max1=433.7;
idle1=402.2;
break;
// Case of 750GB SATA HDD [J4400 with 220V and 2 SIMs]
case 2: 
max1=472.4;
idle1=408;
break;
// Case of 1TB SATA HDD [J4400 with 220V and 2 SIMs]
case 3: 
max1=533.9;
idle1=388.8;
break;
// Case of 73GB SAS HDD [J4400 with 220V and 2 SIMs]
case 4: 
max1=470;
idle1=424;
break;
// Case of 146GB SAS HDD [J4400 with 220V and 2 SIMs]
case 5: 
max1=477.6;
idle1=468.4;
break;
// Case of 300GB SAS HDD [J4400 with 220V and 2 SIMs]
case 6: 
max1=590;
idle1=530;
}
// Calculates Max Power
document.form1.sys_tot.value=Math.round(max1);
var temp=(1*document.form1.sys_tot.value);
document.form1.btu_power.value=Math.round(temp*3.414)

// Calculates Idle Power
document.form1.sys_idle.value=Math.round(idle1);
var temp=(1*document.form1.sys_idle.value);
document.form1.btu_idle.value=Math.round(temp*3.414)
}


function systot() {
var a=(1*document.form1.voltage.value);
var b=(1*document.form1.model.value);
var c=(1*document.form1.sim.value);
var d=(1*document.form1.diskdrive.value);

if ((a==1) && (b==1) && (c==1)) {
ServerModule(d);
}
else if ((a==1) && (b==1) && (c==2)) {
ServerModule2(d);
}
else if ((a==2) && (b==1) && (c==1)) {
ServerModule3(d);
}
else if ((a==2) && (b==1) && (c==2)) {
ServerModule4(d);
}
else if ((a==1) && (b==2) && (c==1)) {
ServerModule5(d);
}
else if ((a==1) && (b==2) && (c==2)) {
ServerModule6(d);
}
else if ((a==2) && (b==2) && (c==1)) {
ServerModule7(d);
}
else if ((a==2) && (b==2) && (c==2)) {
ServerModule8(d);
}
}


function setOptions(chosen) {
var selbox = document.form1.diskdrive
 
selbox.options.length = 0;
if (chosen == "1") {
  selbox.options[selbox.options.length] = new Option('None','0');
  selbox.options[selbox.options.length] = new Option('12 x 250GB SATA HDDs','1');
  selbox.options[selbox.options.length] = new Option('12 x 500GB SATA HDDs','2');
  selbox.options[selbox.options.length] = new Option('12 x 750GB SATA HDDs','3');
  selbox.options[selbox.options.length] = new Option('12 x 1TB SATA HDDs','4');
  selbox.options[selbox.options.length] = new Option('12 x 73GB SAS HDDs','5');
  selbox.options[selbox.options.length] = new Option('12 x 146GB SAS HDDs','6');
  selbox.options[selbox.options.length] = new Option('12 x 300GB SAS HDDs','7');
}
if (chosen == "2") {
  selbox.options[selbox.options.length] = new Option('None','0');
  selbox.options[selbox.options.length] = new Option('24 x 500GB SATA HDDs','1');
  selbox.options[selbox.options.length] = new Option('24 x 750GB SATA HDDs','2');
  selbox.options[selbox.options.length] = new Option('24 x 1TB SATA HDDs','3');
  selbox.options[selbox.options.length] = new Option('24 x 73GB SAS HDDs','4');
  selbox.options[selbox.options.length] = new Option('24 x 146GB SAS HDDs','5');
  selbox.options[selbox.options.length] = new Option('24 x 300GB SAS HDDs','6');
}
}

function PrintMenu() {
var a=(1*document.form1.model.value);
if (a==1) {
setOptions('1');
}
if (a==2) {
setOptions('2');
}
}

// Calls ALL Functions
function proceed() {
systot();
}
