 

function ServerModule(model) {

var a=model;

var max1=0;
var idle1=0;
var max2=0;
var idle2=0;
var max3=0;
var idle3=0;

var workload=(((1*document.form1.workload.value))/100);

switch (a) {
case 0: max1=0; idle1=0; max2=0; idle2=0; max3=0; idle3=0;break;
// Case of Model 2218 HE CPUs (2.6 GHz / 55w) 
case 1: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=205;
idle1=155;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=212;
idle1=158;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=219;
idle1=161;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=226;
idle1=163;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=205;
idle1=155;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=217;
idle1=155;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=229;
idle1=159;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=241;
idle1=163;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=253;
idle1=166.5;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=265;
idle1=170;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=277;
idle1=173.5;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=289;
idle1=177;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=203;
idle2=155;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=212;
idle2=158;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=220;
idle2=161;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=229;
idle2=164;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=235;
idle2=166;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=241;
idle2=168;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=247;
idle2=170;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=253;
idle2=172;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=197;
idle3=153;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=201;
idle3=155;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=204;
idle3=156;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=208;
idle3=157;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=211;
idle3=158;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=214;
idle3=159;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=217;
idle3=160;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=220;
idle3=161;
}
break;

//Model 2222 CPUs (3.0GHz / 75w)
case 2: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=357;
idle1=156;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=362;
idle1=158;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=368;
idle1=160;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=374;
idle1=162;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=352;
idle1=153;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=361;
idle1=155;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=373;
idle1=159;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=384;
idle1=163;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=396;
idle1=166.5;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=408;
idle1=170;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=420;
idle1=173.5;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=432;
idle1=177;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=355;
idle2=156;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=362;
idle2=160;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=369;
idle2=161;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=377;
idle2=163;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=383;
idle2=165;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=389;
idle2=167;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=395;
idle2=169;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=401;
idle2=171;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=349;
idle3=153;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=353;
idle3=155;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=357;
idle3=156;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=360;
idle3=157;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=363;
idle3=158;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=366;
idle3=159;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=369;
idle3=160;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=372;
idle3=161;
}
break;

// Model 2224 SE CPUs (3.2GHz / 105w)
case 3: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=395;
idle1=161;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=400;
idle1=162;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=405;
idle1=164;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=410;
idle1=166;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=380;
idle1=157;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=390;
idle1=158;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=402;
idle1=162;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=414;
idle1=166;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=426;
idle1=169.5;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=438;
idle1=173;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=450;
idle1=176.5;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=462;
idle1=180;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=393;
idle2=161;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=402;
idle2=163;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=408;
idle2=165;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=413;
idle2=167;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=419;
idle2=169;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=425;
idle2=171;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=431;
idle2=173;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=437;
idle2=175;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=375;
idle3=157;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=379;
idle3=158;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=383;
idle3=159;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=386;
idle3=160;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=389;
idle3=161;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=392;
idle3=162;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=395;
idle3=163;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=398;
idle3=164;
}

break;

// Model 2356 CPUs (2.3GHz / 75w)
case 4: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=253;
idle1=176;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=261;
idle1=180;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=269;
idle1=184;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=277;
idle1=188;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=246;
idle1=177;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=254;
idle1=179;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=263;
idle1=181;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=271;
idle1=183;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=440;
idle1=207.5;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=452;
idle1=211;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=464;
idle1=214.5;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=476;
idle1=218;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=251;
idle2=176;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=261;
idle2=180;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=270;
idle2=185;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=280;
idle2=189;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=440;
idle2=210;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=446;
idle2=212;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=452;
idle2=214;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=458;
idle2=216;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=247;
idle3=178;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=254;
idle3=180;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=262;
idle3=181;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=269;
idle3=183;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=385;
idle3=199;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=388;
idle3=200;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=391;
idle3=201;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=394;
idle3=202;
}

break;
// Model 2347 HE CPUs (1.9GHz / 55w)
case 5: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=216;
idle1=169;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=221;
idle1=171;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=227;
idle1=173;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=232;
idle1=174;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=219;
idle1=174;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=229;
idle1=175;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=241;
idle1=179;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=253;
idle1=183;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=251;
idle1=178.5;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=263;
idle1=182;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=275;
idle1=185.5;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=287;
idle1=189;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=214;
idle2=169;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=224;
idle2=172;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=229;
idle2=174;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=235;
idle2=175;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=241;
idle2=177;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=247;
idle2=179;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=253;
idle2=181;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=259;
idle2=183;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=210;
idle3=166;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=215;
idle3=168;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=218;
idle3=169;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=221;
idle3=170;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=238;
idle3=178;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=241;
idle3=179;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=244;
idle3=180;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=247;
idle3=181;
}

break;
// Model 2360 SE CPUs (2.5GHz / 105w)
case 6: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=282;
idle1=181;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=293;
idle1=185;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=305;
idle1=189;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=316;
idle1=193;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=283;
idle1=180;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=290;
idle1=183;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=296;
idle1=185;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=303;
idle1=188;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=280;
idle2=181;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=293;
idle2=185;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=306;
idle2=190;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=319;
idle2=194;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=280;
idle3=181;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=288;
idle3=183;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=295;
idle3=184;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=303;
idle3=186;
}

break;
// Model 2380 (2.5 GHz / 75w)
case 7: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=232;
idle1=166;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=240;
idle1=170;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=248;
idle1=174;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=256;
idle1=178;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=225;
idle1=167;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=233;
idle1=169;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=242;
idle1=171;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=250;
idle1=173;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=230;
idle2=166;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=240;
idle2=170;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=249;
idle2=174;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=259;
idle2=179;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=226;
idle3=168;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=233;
idle3=169;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=241;
idle3=171;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=248;
idle3=173;
}

break;
// Model 2384 (2.7 GHz / 75w)
case 8: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=241;
idle1=168;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=249;
idle1=172;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=257;
idle1=176;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=265;
idle1=180;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=234;
idle1=169;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=242;
idle1=171;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=251;
idle1=173;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=259;
idle1=175;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=239;
idle2=168;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=249;
idle2=172;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=258;
idle2=176;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=268;
idle2=181;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=235;
idle3=170;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=242;
idle3=171;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=250;
idle3=173;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=257;
idle3=175;
}

break;
// Model 2376HE (2.3 GHz / 75w)
case 9: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=216;
idle1=167;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=225;
idle1=171;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=235;
idle1=175;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=244;
idle1=178;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=214;
idle1=168;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=221;
idle1=170;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=229;
idle1=172;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=236;
idle1=174;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=214;
idle2=167;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=225;
idle2=171;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=236;
idle2=175;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=247;
idle2=179;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=211;
idle3=166;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=218;
idle3=168;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=225;
idle3=170;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=231;
idle3=172;
}
break;

// Model 2389 CPUs (2.9GHz)
case 10: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=241;
idle1=168;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=249;
idle1=172;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=257;
idle1=176;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=265;
idle1=180;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=234;
idle1=169;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=242;
idle1=171;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=251;
idle1=173;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=259;
idle1=175;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=239;
idle2=168;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=249;
idle2=172;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=258;
idle2=176;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=268;
idle2=181;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=235;
idle3=170;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=242;
idle3=171;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=250;
idle3=173;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=257;
idle3=175;
}
break;

// Model 2435 ( 2.6GHz /w)
case 11: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=253;
idle1=173;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=264;
idle1=177;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=275;
idle1=181;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=287;
idle1=185;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=253;
idle1=171;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=263;
idle1=175;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=273;
idle1=178;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=284;
idle1=182;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=245;
idle2=174;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=254;
idle2=176;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=264;
idle2=178;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=273;
idle2=180;
}
break;

// Model 2431 ( 2.4GHz /w) 
case 12: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=253;
idle1=179;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=265;
idle1=183;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=277;
idle1=187;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=289;
idle1=191;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=253;
idle1=177;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=264;
idle1=180;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=275;
idle1=184;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=286;
idle1=188;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=245;
idle2=180;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=255;
idle2=182;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=265;
idle2=184;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=276;
idle2=186;
}
break;

// Model 2427 ( 2.2GHz /w) 
case 13: 
if ((1*document.form1.EightGbMemory.value)==2) {
max1=241;
idle1=173;
}
if ((1*document.form1.EightGbMemory.value)==4) {
max1=253;
idle1=176;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=265;
idle1=180;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=278;
idle1=184;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=240;
idle1=171;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=252;
idle1=174;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=265;
idle1=177;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=277;
idle1=181;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=232;
idle2=173;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=244;
idle2=175;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=255;
idle2=177;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=266;
idle2=179;
}
break;
}

if ((max1>max2)&&(max1>max3)) {
var system_power=(max1+(4.5*document.form1.TwoGbMemory.value)+(2*document.form1.OneGbMemory.value));
var system_idle=(idle1+(1.5*document.form1.TwoGbMemory.value)+(0.5*document.form1.OneGbMemory.value));
}
else if ((max2>max1)&&(max2>max3)) {
var system_power=(max2+(6*document.form1.FourGbMemory.value)+(2*document.form1.OneGbMemory.value));
var system_idle=(idle2+(2*document.form1.FourGbMemory.value)+(0.5*document.form1.OneGbMemory.value));
}
else if ((max3>max2)&&(max3>max1)) {
var system_power=(max3+(6*document.form1.FourGbMemory.value)+(4.5*document.form1.TwoGbMemory.value));
var system_idle=(idle3+(2*document.form1.FourGbMemory.value)+(1.5*document.form1.TwoGbMemory.value));
}
else {
var system_power=0;
var system_idle=0;
}

var proc = (1*document.form1.Processor.value);
if (proc == 10)  {
	system_power = (system_power + (system_power*0.03));
	system_idle = (system_idle + (system_idle*0.03));
}

var hdd_idle=(10*document.form1.hdd.value);
var hdd_max=(12*document.form1.hdd.value);

var pci_idle=(12*document.form1.pci.value);
var pci_max=(20*document.form1.pci.value);

var dvd=(10*document.form1.DVD.value);

var ssd_min=(0.1*document.form1.ssd.value);
var ssd_max=(2.4*document.form1.ssd.value);

var total_max=system_power+ssd_max+hdd_max+pci_max+dvd-32;
var total_idle=system_idle+ssd_min+hdd_idle+pci_idle+dvd-22;

var tot=Math.round((100*((total_idle+((total_max-total_idle)*workload))))/100);


document.form1.sys_tot.value=Math.round(tot);
document.form1.idle_tot.value=Math.round(total_idle);
document.form1.btu_power.value=Math.round((((document.form1.sys_tot.value*3600)/1055.056)*100)/100);
document.form1.btu_power2.value=Math.round((((document.form1.idle_tot.value*3600)/1055.056)*100)/100);


}


function ServerModule2(model) {

var a=model;

var max1=0;
var idle1=0;
var max2=0;
var idle2=0;
var max3=0;
var idle3=0;

var workload=(((1*document.form1.workload.value))/100);

switch (a) {
case 0: max1=0; idle1=0; max2=0; idle2=0; max3=0; idle3=0;break;
// Case of Model 2218 HE CPUs (2.6 GHz / 55w) 
case 1: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=281;
idle1=179;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=289;
idle1=182;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=296;
idle1=185;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=304;
idle1=188;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=311;
idle1=191;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=319;
idle1=193;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=326;
idle1=196;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=282;
idle1=179;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=301;
idle1=182;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=320;
idle1=184;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=328;
idle1=187;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=336;
idle1=190;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=344;
idle1=193;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=353;
idle1=196;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=265;
idle2=176;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=278;
idle2=179;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=288;
idle2=183;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=298;
idle2=187;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=305;
idle2=189;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=313;
idle2=192;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=321;
idle2=195;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=329;
idle2=198;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=256;
idle3=173;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=265;
idle3=177;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=270;
idle3=178;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=275;
idle3=179;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=278;
idle3=180;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=280;
idle3=180;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=283;
idle3=181;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=286;
idle3=182;
}
break;
//Model 2222 CPUs (3.0GHz / 75w)

case 2: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=353;
idle1=175;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=361;
idle1=178;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=369;
idle1=181;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=377;
idle1=184;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=385;
idle1=187;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=392;
idle1=190;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=400;
idle1=193;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=359;
idle1=174;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=374;
idle1=177;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=390;
idle1=180;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=398;
idle1=183;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=407;
idle1=186;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=416;
idle1=188;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=425;
idle1=191;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=338;
idle2=172;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=350;
idle2=175;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=360;
idle2=179;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=370;
idle2=182;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=378;
idle2=186;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=386;
idle2=189;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=394;
idle2=192;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=403;
idle2=195;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=355;
idle3=169;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=363;
idle3=173;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=368;
idle3=173;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=372;
idle3=174;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=375;
idle3=175;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=378;
idle3=177;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=381;
idle3=178;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=384;
idle3=179;
}

break;
//Model 2224 SE CPUs (3.2GHz / 105w)

case 3: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=461;
idle1=181;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=469;
idle1=184;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=476;
idle1=187;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=484;
idle1=190;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=492;
idle1=193;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=499;
idle1=196;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=507;
idle1=199;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=491;
idle1=180;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=506;
idle1=183;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=522;
idle1=186;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=530;
idle1=188;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=539;
idle1=191;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=548;
idle1=194;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=557;
idle1=197;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=446;
idle2=178;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=458;
idle2=181;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=468;
idle2=184;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=478;
idle2=188;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=486;
idle2=191;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=494;
idle2=194;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=502;
idle2=197;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=510;
idle2=201;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=505;
idle3=175;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=512;
idle3=178;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=517;
idle3=179;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=522;
idle3=180;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=525;
idle3=181;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=528;
idle3=182;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=530;
idle3=183;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=533;
idle3=184;
}

break;
// Model 2356 CPUs (2.3GHz / 75w)
case 4: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=355;
idle1=216;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=363;
idle1=220;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=370;
idle1=223;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=377;
idle1=226;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=385;
idle1=230;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=392;
idle1=233;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=399;
idle1=236;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=389;
idle1=211;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=347;
idle1=213;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=354;
idle1=216;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=362;
idle1=219;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=369;
idle1=222;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=376;
idle1=224;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=384;
idle1=227;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=391;
idle1=230;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=395;
idle2=216;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=352;
idle2=216;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=360;
idle2=220;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=369;
idle2=223;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=377;
idle2=227;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=385;
idle2=231;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=394;
idle2=234;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=402;
idle2=238;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=341;
idle3=212;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=346;
idle3=214;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=351;
idle3=216;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=356;
idle3=218;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=361;
idle3=219;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=366;
idle3=221;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=371;
idle3=223;
}

break;
// Model 2347 HE CPUs (1.9GHz / 55w)
case 5: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=292;
idle1=209;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=300;
idle1=212;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=307;
idle1=215;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=315;
idle1=218;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=323;
idle1=221;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=330;
idle1=223;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=338;
idle1=226;
}
if ((1*document.form1.FourGbMemory.value)==2) {
max1=290;
idle1=199;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=286;
idle1=198;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=301;
idle1=200;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=316;
idle1=203;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=325;
idle1=206;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=334;
idle1=209;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=343;
idle1=212;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=351;
idle1=214;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=294;
idle2=201;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=289;
idle2=209;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=299;
idle2=212;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=309;
idle2=216;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=317;
idle2=219;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=325;
idle2=222;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=333;
idle2=225;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=341;
idle2=228;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=278;
idle3=198;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=312;
idle3=193;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=317;
idle3=193;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=322;
idle3=194;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=325;
idle3=195;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=328;
idle3=197;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=331;
idle3=198;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=334;
idle3=199;
}

break;
// Model 2360 SE CPUs (2.5GHz)
case 6: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=396;
idle1=218;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=405;
idle1=222;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=413;
idle1=225;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=422;
idle1=229;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=431;
idle1=232;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=439;
idle1=236;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=448;
idle1=239;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=389;
idle1=218;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=396;
idle1=221;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=403;
idle1=223;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=410;
idle1=226;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=417;
idle1=228;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=424;
idle1=231;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=431;
idle1=233;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=294;
idle2=201;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=393;
idle2=218;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=403;
idle2=222;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=412;
idle2=226;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=422;
idle2=230;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=432;
idle2=233;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=441;
idle2=237;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=451;
idle2=241;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=278;
idle3=198;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=369;
idle3=214;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=376;
idle3=216;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=382;
idle3=218;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=389;
idle3=221;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=396;
idle3=223;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=402;
idle3=225;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=409;
idle3=227;
}

break;
// Model 2380 (2.5 GHz / 75w)
case 7: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=313;
idle1=195;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=321;
idle1=199;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=328;
idle1=202;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=335;
idle1=205;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=343;
idle1=209;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=350;
idle1=212;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=357;
idle1=215;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=305;
idle1=192;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=312;
idle1=195;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=320;
idle1=198;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=327;
idle1=201;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=334;
idle1=203;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=342;
idle1=206;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=349;
idle1=209;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=310;
idle2=195;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=318;
idle2=199;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=327;
idle2=202;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=335;
idle2=206;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=343;
idle2=210;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=352;
idle2=213;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=360;
idle2=217;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=299;
idle3=191;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=304;
idle3=193;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=309;
idle3=195;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=314;
idle3=197;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=319;
idle3=198;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=324;
idle3=200;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=329;
idle3=202;
}

break;
// Model 2384 (2.7 GHz / 75w)
case 8: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=331;
idle1=199;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=339;
idle1=203;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=346;
idle1=206;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=353;
idle1=209;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=361;
idle1=213;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=368;
idle1=216;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=375;
idle1=219;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=323;
idle1=196;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=330;
idle1=199;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=338;
idle1=202;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=345;
idle1=205;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=352;
idle1=208;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=360;
idle1=211;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=367;
idle1=213;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=328;
idle2=199;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=336;
idle2=203;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=345;
idle2=207;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=353;
idle2=210;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=361;
idle2=214;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=370;
idle2=218;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=378;
idle2=221;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=317;
idle3=195;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=322;
idle3=197;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=327;
idle3=199;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=332;
idle3=201;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=337;
idle3=203;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=342;
idle3=205;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=347;
idle3=206;
}
break;

// Model 2376HE (2.3 GHz / 75w)
case 9: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=285;
idle1=194;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=295;
idle1=198;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=305;
idle1=201;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=315;
idle1=205;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=326;
idle1=209;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=336;
idle1=212;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=346;
idle1=216;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=281;
idle1=194;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=289;
idle1=197;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=296;
idle1=199;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=303;
idle1=202;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=311;
idle1=204;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=318;
idle1=207;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=325;
idle1=209;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=282;
idle2=194;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=293;
idle2=198;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=304;
idle2=202;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=315;
idle2=206;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=327;
idle2=210;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=338;
idle2=214;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=349;
idle2=218;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=277;
idle3=192;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=284;
idle3=194;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=290;
idle3=196;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=297;
idle3=198;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=303;
idle3=200;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=310;
idle3=202;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=316;
idle3=204;
}
break;

// Model 2389 CPUs (2.9GHz)
case 10: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=331;
idle1=199;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=339;
idle1=203;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=346;
idle1=206;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=353;
idle1=209;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=361;
idle1=213;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=368;
idle1=216;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=375;
idle1=219;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=323;
idle1=196;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=330;
idle1=199;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=338;
idle1=202;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=345;
idle1=205;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=352;
idle1=208;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=360;
idle1=211;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=367;
idle1=213;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=328;
idle2=199;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=336;
idle2=203;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=345;
idle2=207;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=353;
idle2=210;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=361;
idle2=214;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=370;
idle2=218;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=378;
idle2=221;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=317;
idle3=195;
}
if ((1*document.form1.OneGbMemory.value)==6) {
max3=322;
idle3=197;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=327;
idle3=199;
}
if ((1*document.form1.OneGbMemory.value)==10) {
max3=332;
idle3=201;
}
if ((1*document.form1.OneGbMemory.value)==12) {
max3=337;
idle3=203;
}
if ((1*document.form1.OneGbMemory.value)==14) {
max3=342;
idle3=205;
}
if ((1*document.form1.OneGbMemory.value)==16) {
max3=347;
idle3=206;
}
break;

// Model 2435 ( 2.6GHz) 
case 11: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=356;
idle1=203;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=366;
idle1=207;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=377;
idle1=211;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=388;
idle1=215;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=399;
idle1=219;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=410;
idle1=223;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=420;
idle1=227;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=360;
idle1=205;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=369;
idle1=207;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=378;
idle1=210;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=386;
idle1=213;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=395;
idle1=215;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=404;
idle1=218;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=413;
idle1=221;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=341;
idle2=202;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=348;
idle2=204;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=355;
idle2=206;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=362;
idle2=208;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=369;
idle2=210;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=376;
idle2=212;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=384;
idle2=213;
}
break;

// Model 2431 ( 2.4GHz) 
case 12: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=333;
idle1=196;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=344;
idle1=200;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=354;
idle1=204;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=364;
idle1=209;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=374;
idle1=213;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=384;
idle1=217;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=394;
idle1=221;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=338;
idle1=198;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=346;
idle1=201;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=354;
idle1=204;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=362;
idle1=206;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=371;
idle1=209;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=379;
idle1=212;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=387;
idle1=215;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=319;
idle2=196;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=325;
idle2=198;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=332;
idle2=200;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=338;
idle2=202;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=345;
idle2=204;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=351;
idle2=206;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=357;
idle2=208;
}
break;

// Model 2427 ( 2.2GHz) 
case 13: 
if ((1*document.form1.EightGbMemory.value)==4) {
max1=319;
idle1=185;
}
if ((1*document.form1.EightGbMemory.value)==6) {
max1=328;
idle1=190;
}
if ((1*document.form1.EightGbMemory.value)==8) {
max1=337;
idle1=194;
}
if ((1*document.form1.EightGbMemory.value)==10) {
max1=346;
idle1=198;
}
if ((1*document.form1.EightGbMemory.value)==12) {
max1=355;
idle1=202;
}
if ((1*document.form1.EightGbMemory.value)==14) {
max1=364;
idle1=206;
}
if ((1*document.form1.EightGbMemory.value)==16) {
max1=373;
idle1=210;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=324;
idle1=187;
}
if ((1*document.form1.FourGbMemory.value)==6) {
max1=330;
idle1=190;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=337;
idle1=193;
}
if ((1*document.form1.FourGbMemory.value)==10) {
max1=344;
idle1=195;
}
if ((1*document.form1.FourGbMemory.value)==12) {
max1=351;
idle1=198;
}
if ((1*document.form1.FourGbMemory.value)==14) {
max1=358;
idle1=201;
}
if ((1*document.form1.FourGbMemory.value)==16) {
max1=365;
idle1=203;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=305;
idle2=185;
}
if ((1*document.form1.TwoGbMemory.value)==6) {
max2=310;
idle2=187;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=315;
idle2=189;
}
if ((1*document.form1.TwoGbMemory.value)==10) {
max2=320;
idle2=191;
}
if ((1*document.form1.TwoGbMemory.value)==12) {
max2=325;
idle2=193;
}
if ((1*document.form1.TwoGbMemory.value)==14) {
max2=330;
idle2=195;
}
if ((1*document.form1.TwoGbMemory.value)==16) {
max2=336;
idle2=196;
}
break;

}

if ((max1>max2)&&(max1>max3)) {
var system_power=(max1+(5*document.form1.TwoGbMemory.value)+(2.75*document.form1.OneGbMemory.value));
var system_idle=(idle1+(2*document.form1.TwoGbMemory.value)+(1*document.form1.OneGbMemory.value));
}
else if ((max2>max1)&&(max2>max3)) {
var system_power=(max2+(7*document.form1.FourGbMemory.value)+(2.75*document.form1.OneGbMemory.value));
var system_idle=(idle2+(2*document.form1.FourGbMemory.value)+(1*document.form1.OneGbMemory.value));
}
else if ((max3>max2)&&(max3>max1)) {
var system_power=(max3+(7*document.form1.FourGbMemory.value)+(6*document.form1.TwoGbMemory.value));
var system_idle=(idle3+(2*document.form1.FourGbMemory.value)+(2*document.form1.TwoGbMemory.value));
}
else {
var system_power=0;
var system_idle=0;
}

var proc = (1*document.form1.Processor.value);
if (proc == 10)  {
	system_power = (system_power + (system_power*0.03));
	system_idle = (system_idle + (system_idle*0.03));
}

var hdd_idle=(10*document.form1.hdd.value);
var hdd_max=(12*document.form1.hdd.value);

var pci_idle=(12*document.form1.pci.value);
var pci_max=(20*document.form1.pci.value);

var dvd=(10*document.form1.DVD.value);

var ssd_min=(0.1*document.form1.ssd.value);
var ssd_max=(2.4*document.form1.ssd.value);

var total_max=system_power+ssd_max+hdd_max+pci_max+dvd-32;
var total_idle=system_idle+ssd_min+hdd_idle+pci_idle+dvd-22;

var tot=Math.round((100*((total_idle+((total_max-total_idle)*workload))))/100);


document.form1.sys_tot.value=Math.round(tot);
document.form1.idle_tot.value=Math.round(total_idle);
document.form1.btu_power.value=Math.round((((document.form1.sys_tot.value*3600)/1055.056)*100)/100);
document.form1.btu_power2.value=Math.round((((document.form1.idle_tot.value*3600)/1055.056)*100)/100);

}


function setOptions(chosen) {
var selbox = document.form1.FourGbMemory;
 
selbox.options.length = 0;
if (chosen == " ") {
  selbox.options[selbox.options.length] = new Option('None','0');
 
}
if (chosen == "1") {
  selbox.options[selbox.options.length] = new Option('None','0');
  selbox.options[selbox.options.length] = new Option('2 DIMMs','2');
  selbox.options[selbox.options.length] = new Option('4 DIMMs','4');
  selbox.options[selbox.options.length] = new Option('6 DIMMs','6');
  selbox.options[selbox.options.length] = new Option('8 DIMMs','8');
}
if (chosen == "2") {
  selbox.options[selbox.options.length] = new Option('None','0');  
  selbox.options[selbox.options.length] = new Option('4 DIMMs','4');
  selbox.options[selbox.options.length] = new Option('6 DIMMs','6');
  selbox.options[selbox.options.length] = new Option('8 DIMMs','8');
  selbox.options[selbox.options.length] = new Option('10 DIMMs','10');
  selbox.options[selbox.options.length] = new Option('12 DIMMs','12');
  selbox.options[selbox.options.length] = new Option('14 DIMMs','14');
  selbox.options[selbox.options.length] = new Option('16 DIMMs','16');
}
}


 function setOptions2(chosen) {
 var selbox2 = document.form1.TwoGbMemory;
 
selbox2.options.length = 0;
if (chosen == " ") {
  selbox2.options[selbox2.options.length] = new Option('None','0');
 
}
if (chosen == "1") {
  selbox2.options[selbox2.options.length] = new Option('None','0');
  selbox2.options[selbox2.options.length] = new Option('2 DIMMs','2');
  selbox2.options[selbox2.options.length] = new Option('4 DIMMs','4');
  selbox2.options[selbox2.options.length] = new Option('6 DIMMs','6');
  selbox2.options[selbox2.options.length] = new Option('8 DIMMs','8');
}
if (chosen == "2") {
  selbox2.options[selbox2.options.length] = new Option('None','0');  
  selbox2.options[selbox2.options.length] = new Option('4 DIMMs','4');
  selbox2.options[selbox2.options.length] = new Option('6 DIMMs','6');
  selbox2.options[selbox2.options.length] = new Option('8 DIMMs','8');
  selbox2.options[selbox2.options.length] = new Option('10 DIMMs','10');
  selbox2.options[selbox2.options.length] = new Option('12 DIMMs','12');
  selbox2.options[selbox2.options.length] = new Option('14 DIMMs','14');
  selbox2.options[selbox2.options.length] = new Option('16 DIMMs','16');
}
}

 function setOptions3(chosen) {
 var selbox3 = document.form1.OneGbMemory;
 var proc = (1*document.form1.Processor.value);
selbox3.options.length = 0;

if (chosen == " " || proc == 11 || proc == 12 || proc == 13) {
  selbox3.options[selbox3.options.length] = new Option('N/A','0');
} else if (chosen == "1") {
  selbox3.options[selbox3.options.length] = new Option('None','0');
  selbox3.options[selbox3.options.length] = new Option('2 DIMMs','2');
  selbox3.options[selbox3.options.length] = new Option('4 DIMMs','4');
  selbox3.options[selbox3.options.length] = new Option('6 DIMMs','6');
  selbox3.options[selbox3.options.length] = new Option('8 DIMMs','8');
} else if (chosen == "2") {
  selbox3.options[selbox3.options.length] = new Option('None','0');  
  selbox3.options[selbox3.options.length] = new Option('4 DIMMs','4');
  selbox3.options[selbox3.options.length] = new Option('6 DIMMs','6');
  selbox3.options[selbox3.options.length] = new Option('8 DIMMs','8');
  selbox3.options[selbox3.options.length] = new Option('10 DIMMs','10');
  selbox3.options[selbox3.options.length] = new Option('12 DIMMs','12');
  selbox3.options[selbox3.options.length] = new Option('14 DIMMs','14');
  selbox3.options[selbox3.options.length] = new Option('16 DIMMs','16');
}
}

 function setOptions4(chosen) {
 var selbox3 = document.form1.EightGbMemory;
 
selbox3.options.length = 0;
if (chosen == " ") {
  selbox3.options[selbox3.options.length] = new Option('None','0');
}
if (chosen == "1") {
  selbox3.options[selbox3.options.length] = new Option('None','0');
  selbox3.options[selbox3.options.length] = new Option('2 DIMMs','2');
  selbox3.options[selbox3.options.length] = new Option('4 DIMMs','4');
  selbox3.options[selbox3.options.length] = new Option('6 DIMMs','6');
  selbox3.options[selbox3.options.length] = new Option('8 DIMMs','8');
}
if (chosen == "2") {
  selbox3.options[selbox3.options.length] = new Option('None','0');  
  selbox3.options[selbox3.options.length] = new Option('4 DIMMs','4');
  selbox3.options[selbox3.options.length] = new Option('6 DIMMs','6');
  selbox3.options[selbox3.options.length] = new Option('8 DIMMs','8');
  selbox3.options[selbox3.options.length] = new Option('10 DIMMs','10');
  selbox3.options[selbox3.options.length] = new Option('12 DIMMs','12');
  selbox3.options[selbox3.options.length] = new Option('14 DIMMs','14');
  selbox3.options[selbox3.options.length] = new Option('16 DIMMs','16');
}
}


function PrintMenu() {
if (document.form1.Quantity.value == 1) {
setOptions('1'); setOptions2('1'); setOptions3('1'); setOptions4('1');
}
else if (document.form1.Quantity.value == 2) {
setOptions('2'); setOptions2('2'); setOptions3('2');setOptions4('2');
}
}

function proceed() {
var a=1*document.form1.Quantity.value;
var b=1*document.form1.Processor.value;
if (a==1) {
ServerModule(b);
}
else if (a==2) {
ServerModule2(b);
}
}

function CheckForm () { 

	//Initialise variables
	var errorMsg = "";


	//Check for DIMM quantity
	if ((document.form1.EightGbMemory.value == "0")&&(document.form1.FourGbMemory.value == "0")&&(document.form1.TwoGbMemory.value == "0")&&(document.form1.OneGbMemory.value == "0")){
		errorMsg += "\n\tDIMMs \t\t- Enter # of DIMMs desired";	
	}
	
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Your request has not been processed because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	proceed();
}



// Ttests to ensure that at least 4 DIMMS are selected
function parameterchecksone() {
CheckForm();
}

