

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;
// Model X5272 3.4GHz 120W / 1600MT/s  - 800MHz RAM
case 1: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=175;
idle1=118;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=202;
idle1=136;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=255;
idle1=172;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=167;
idle2=117;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=188;
idle2=131;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=231;
idle2=159;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=163;
idle3=113;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=180;
idle3=123;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=215;
idle3=143;
}
break;

// Model X5472 3.0GHz 120W – 1600MT/s – 800MHz RAM
case 2: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=183;
idle1=104.5;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=210;
idle1=122;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=264;
idle1=157;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=176.5;
idle2=106;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=197;
idle2=125;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=238;
idle2=163;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=172.5;
idle3=102;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=189;
idle3=117;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=222;
idle3=147;
}
break;

// Model Model X5460 3.16GHz 120W – 1333MT/s – 667MHz RAM
case 3: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=214.5;
idle1=113.5;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=238;
idle1=129;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=285;
idle1=160;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=213.5;
idle2=112.5;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=236;
idle2=127;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=281;
idle2=156;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=209.5;
idle3=108.5;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=228;
idle3=119;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=265;
idle3=140;
}
break;

// Model E5462 2.8GHz 80W  – 1600MT/s – 800MHz RAM
case 4: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=182;
idle1=119;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=208;
idle1=135;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=261;
idle1=168;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=179;
idle2=113;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=199;
idle2=131;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=239;
idle2=168;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=175;
idle3=109;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=191;
idle3=123;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=223;
idle3=152;
}
break;

// Model L5420 2.5GHz 50W – 1333MT/s – 667MHz RAM
case 5: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=153.5;
idle1=99.5;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=177;
idle1=115;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=224;
idle1=146;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=152.5;
idle2=98.5;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=175;
idle2=113;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=220;
idle2=142;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=148.5;
idle3=94.5;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=167;
idle3=105;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=204;
idle3=126;
}
break;

//Model E5405 2.0GHz 80W – 1333MT/s – 667MHz RAM
case 6: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=153;
idle1=109;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=178;
idle1=124;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=225;
idle1=155;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=154;
idle2=108;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=177;
idle2=122;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=222;
idle2=151;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=150;
idle3=104;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=169;
idle3=114;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=206;
idle3=135;
}
break;

//Model E5472, 3.0GHz 80W – 1600MT/s – 800MHz RAM
case 7: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=182;
idle1=116;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=210;
idle1=134;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=279;
idle1=169;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=171;
idle2=110;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=193;
idle2=124;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=237;
idle2=164;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=167;
idle3=106;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=185;
idle3=116;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=221;
idle3=148;
}
break;

//Model X5482, 3.2GHz 120W – 1600MT/s – 800MHz RAM
case 8: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=217;
idle1=124;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=245;
idle1=142;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=300;
idle1=178;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=209;
idle2=124;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=232;
idle2=141;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=278;
idle2=176;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=205;
idle3=120;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=224;
idle3=133;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=262;
idle3=160;
}
break;

}

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

var pci=(10*document.form1.pci.value);

var hdd_idle=((12*document.form1.HardDrive146.value)+(10*document.form1.HardDrive73.value)+(8*document.form1.HardDrive250.value));
var hdd_max=((16*document.form1.HardDrive146.value)+(14*document.form1.HardDrive73.value)+(12*document.form1.HardDrive250.value));

var dvd_idle=(3*document.form1.DVD.value);
var dvd_max=(8*document.form1.DVD.value);

var total_max=system_power+hdd_max+pci+dvd_max-12;
var total_idle=system_idle+hdd_idle+pci+dvd_idle-8;

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;
// Model X5272 3.4GHz 120W / 1600MT/s  - 800MHz RAM
case 1: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=238;
idle1=131;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=268;
idle1=150;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=328;
idle1=188;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=230;
idle2=129;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=252;
idle2=145;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=295;
idle2=178;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=226;
idle3=125;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=244;
idle3=137;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=279;
idle3=162;
}
break;

// Model X5472 3.0GHz 120W – 1600MT/s – 800MHz RAM
case 2: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=279;
idle1=122.5;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=306;
idle1=140;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=360;
idle1=175;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=272.5;
idle2=124;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=293;
idle2=143;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=334;
idle2=181;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=268.5;
idle3=120;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=285;
idle3=135;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=318;
idle3=165;
}
break;

// Model X5460 3.16GHz 120W – 1333MT/s – 667MHz RAM
case 3: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=343.5;
idle1=145.5;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=367;
idle1=161;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=414;
idle1=192;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=342.5;
idle2=144.5;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=365;
idle2=159;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=410;
idle2=188;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=338.5;
idle3=140.5;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=357;
idle3=151;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=394;
idle3=172;
}
break;

// Model E5462 2.8GHz 80W  – 1600MT/s – 800MHz RAM
case 4: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=255;
idle1=137;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=288;
idle1=155;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=355;
idle1=191;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=239;
idle2=136;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=265;
idle2=152;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=316;
idle2=184;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=235;
idle3=132;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=257;
idle3=144;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=300;
idle3=168;
}
break;

// Model L5420 2.5GHz 85W – 1333MT/s – 667MHz RAM
case 5: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=216.5;
idle1=108.5;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=240;
idle1=124;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=287;
idle1=155;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=215.5;
idle2=107.5;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=238;
idle2=122;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=283;
idle2=151;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=211.5;
idle3=103.5;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=230;
idle3=114;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=267;
idle3=135;
}
break;

// Model E5405 2.0GHz 80W – 1333MT/s – 667MHz RAM
case 6: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=206;
idle1=117;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=231;
idle1=132;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=278;
idle1=163;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=207;
idle2=116;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=230;
idle2=130;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=275;
idle2=159;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=203;
idle3=112;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=222;
idle3=122;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=259;
idle3=143;
}
break;

// Model E5472, 3.0GHz 80W – 1600MT/s – 800MHz RAM
case 7: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=253;
idle1=130;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=290;
idle1=147;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=346;
idle1=183;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=240;
idle2=129;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=267;
idle2=142;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=318;
idle2=177;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=236;
idle3=125;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=259;
idle3=134;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=302;
idle3=161;
}
break;

// Model X5482, 3.2GHz 120W – 1600MT/s – 800MHz RAM
case 8: 
if ((1*document.form1.FourGbMemory.value)==2) {
max1=319;
idle1=148;
}
if ((1*document.form1.FourGbMemory.value)==4) {
max1=350;
idle1=165;
}
if ((1*document.form1.FourGbMemory.value)==8) {
max1=411;
idle1=200;
}
if ((1*document.form1.TwoGbMemory.value)==2) {
max2=304;
idle2=148;
}
if ((1*document.form1.TwoGbMemory.value)==4) {
max2=330;
idle2=164;
}
if ((1*document.form1.TwoGbMemory.value)==8) {
max2=381;
idle2=197;
}
if ((1*document.form1.OneGbMemory.value)==2) {
max3=300;
idle3=144;
}
if ((1*document.form1.OneGbMemory.value)==4) {
max3=322;
idle3=156;
}
if ((1*document.form1.OneGbMemory.value)==8) {
max3=365;
idle3=181;
}
break;

}

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

var pci=(10*document.form1.pci.value);

var hdd_idle=((12*document.form1.HardDrive146.value)+(10*document.form1.HardDrive73.value)+(8*document.form1.HardDrive250.value));
var hdd_max=((16*document.form1.HardDrive146.value)+(14*document.form1.HardDrive73.value)+(12*document.form1.HardDrive250.value));

var dvd_idle=(3*document.form1.DVD.value);
var dvd_max=(8*document.form1.DVD.value);

var total_max=system_power+hdd_max+pci+dvd_max-12;
var total_idle=system_idle+hdd_idle+pci+dvd_idle-8;

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('8 DIMMs','8');  
}
if (chosen == "2") {
  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('8 DIMMs','8');
}
}


 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('8 DIMMs','8');  
}
if (chosen == "2") {
  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('8 DIMMs','8');
}
}

 function setOptions3(chosen) {
 var selbox3 = document.form1.OneGbMemory;
 
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('8 DIMMs','8');
}
if (chosen == "2") {
  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('8 DIMMs','8');
}
}

 function setOptions4(chosen) {
 var selbox4 = document.form1.HardDrive146;
 
selbox4.options.length = 0;
if (chosen == " ") {
  selbox4.options[selbox4.options.length] = new Option('None','0');
}
if (chosen == "1") {
  selbox4.options[selbox4.options.length] = new Option('None','0');
  selbox4.options[selbox4.options.length] = new Option('1 HDD','1');
  selbox4.options[selbox4.options.length] = new Option('2 HDDs','2');
}
if (chosen == "2") {
  selbox4.options[selbox4.options.length] = new Option('None','0');
  selbox4.options[selbox4.options.length] = new Option('1 HDD','1');
  selbox4.options[selbox4.options.length] = new Option('2 HDDs','2');
}
}

 function setOptions5(chosen) {
 var selbox5 = document.form1.HardDrive73;
 
selbox5.options.length = 0;
if (chosen == " ") {
  selbox5.options[selbox5.options.length] = new Option('None','0');
}
if (chosen == "1") {
  selbox5.options[selbox5.options.length] = new Option('None','0');
  selbox5.options[selbox5.options.length] = new Option('1 HDD','1');
  selbox5.options[selbox5.options.length] = new Option('2 HDDs','2');
}
if (chosen == "2") {
  selbox5.options[selbox5.options.length] = new Option('None','0');
  selbox5.options[selbox5.options.length] = new Option('1 HDD','1');
  selbox5.options[selbox5.options.length] = new Option('2 HDDs','2');
}
}

function PrintMenu() {
if (document.form1.Quantity.value == 1) {
setOptions('1'); setOptions2('1'); setOptions3('1'); 
}
else if (document.form1.Quantity.value == 2) {
setOptions('2'); setOptions2('2'); setOptions3('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.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();
}

