// JavaScript Document
function addtotal()
{
//alert("hiii");
//var str1=document.form1.Processor.length;
var total=374;
for (var i=0; i < document.form1.Processor.length; i++)
   {
   if (document.form1.Processor[i].checked)
      {
      var rad_val = document.form1.Processor[i].value;
      }
   }
   if(rad_val=="XEONE5420")
   {
   total=total+25;
   }
        
   for (var i=0; i < document.form1.Memory.length; i++)
   {
   if (document.form1.Memory[i].checked)
      {
      var rad_val = document.form1.Memory[i].value;
      }
   }
    if(rad_val=="3GBECC")
   {
   total=total+30;
   }
    if(rad_val=="4GBECC")
   {
   total=total+50;
   }
   if(rad_val=="8GBECC")
   {
   total=total+150;
   }
    if(rad_val=="12GBECC")
   {
   total=total+250;
   }
    if(rad_val=="16GBECC")
   {
   total=total+400;
   }
    if(rad_val=="24GBECC")
   {
   total=total+500;
   }
    
  // alert(total);
   for (var i=0; i < document.form1.Hd1.length; i++)
   {
   if (document.form1.Hd1[i].checked)
      {
      var rad_val = document.form1.Hd1[i].value;
      }
   }
     if(rad_val=="120IDE")
   {
     var str1=document.form1.upgrade_120IDE.value;
	 if(str1=="160GB")
	 {
		total=total+5; 
	 }
	  if(str1=="250GB")
	 {
		total=total+15; 
	 }
	  if(str1=="500GB")
	 {
		total=total+30; 
	 }
	  if(str1=="750GB")
	 {
		total=total+50; 
	 }
	  if(str1=="1000GB")
	 {
		total=total+70; 
	 }
	  if(str1=="74GBRAPTOR")
	 {
		total=total+20; 
	 }
   }
   
    if(rad_val=="2x120IDEHWR1")
   {
	   total=total+40; 
     var str1=document.form1.upgrade_2x120IDEHWR1.value;
	 if(str1=="160GB")
	 {
		total=total+10; 
	 }
	  if(str1=="250GB")
	 {
		total=total+20; 
	 }
	  if(str1=="500GB")
	 {
		total=total+60; 
	 }
	  if(str1=="750GB")
	 {
		total=total+100; 
	 }
	  if(str1=="1000GB")
	 {
		total=total+125; 
	 }
	  if(str1=="74GBRAPTOR")
	 {
		total=total+40; 
	 }
   }
  
  if(rad_val=="73SCSI")
   {
	   total=total+60; 
     var str1=document.form1.upgrade_73SCSI.value;
	 if(str1=="147GB")
	 {
		total=total+30; 
	 }
	  if(str1=="300GB")
	 {
		total=total+70; 
	 }
	 
	  if(str1=="36GB")
	 {
		total=total-10; 
	 }	 
	 if(document.form1.SCSI_15K_upgrade.checked)
	 total=total+10;
	 if(document.form1.SCSI_SAS_upgrade.checked)
	 total=total+30;
	
   }
  if(rad_val=="73SCSIHWR1")
   {
	   total=total+120; 
     var str1=document.form1.upgrade_73SCSIHWR1.value;
	 if(str1=="147GB")
	 {
		total=total+50; 
	 }
	  if(str1=="300GB")
	 {
		total=total+100; 
	 }
	  if(str1=="36GB")
	 {
		total=total-20; 
	 }
	 
	 if(document.form1.SCSIHWR1_15K_upgrade.checked)
	 total=total+20;
	 if(document.form1.SCSIHWR1_SAS_upgrade.checked)
	 total=total+40;
	// alert(total);
   }
 if(rad_val=="3x120IDEHWR5")
   {
      total=total+100;
	 var str1=document.form1.upgrade_3x120IDEHWR5.value;
	 if(str1=="160GB")
	 {
	   total=total+10;
	 }
	  if(str1=="250GB")
	 {
	   total=total+30;
	 }
	 if(str1=="500GB")
	 {
	   total=total+90;
	 }
	 if(str1=="74GBRAPTOR")
	 {
	   total=total+60;
	 }
   }
   if(rad_val=="4x120IDEHWR5")
   {
      total=total+120;
	 var str1=document.form1.upgrade_4x120IDEHWR5.value;
	 if(str1=="160GB")
	 {
	   total=total+15;
	 }
	  if(str1=="250GB")
	 {
	   total=total+40;
	 }
	 if(str1=="500GB")
	 {
	   total=total+120;
	 }
	 if(str1=="74GBRAPTOR")
	 {
	   total=total+80;
	 }
   }
   if(rad_val=="4x120IDEHWR10")
   {
      total=total+120;
	 var str1=document.form1.upgrade_4x120IDEHWR10.value;
	 if(str1=="160GB")
	 {
	   total=total+15;
	 }
	  if(str1=="250GB")
	 {
	   total=total+40;
	 }
	 if(str1=="500GB")
	 {
	   total=total+120;
	 }
	 if(str1=="750GB")
	 {
	   total=total+200;
	 }
	 if(str1=="1000GB")
	 {
	   total=total+300;
	 }
	 if(str1=="74GBRAPTOR")
	 {
	   total=total+80;
	 }
   }
   if(rad_val=="73SCSIHWR5")
   {
	   total=total+175; 
     var str1=document.form1.upgrade_73SCSIHWR5.value;
	 if(str1=="147GB")
	 {
		total=total+100; 
	 }
	  if(str1=="300GB")
	 {
		total=total+200; 
	 }
	  if(str1=="36GB")
	 {
		total=total-30; 
	 }
	 
	 if(document.form1.SCSIHWR5_15K_upgrade.checked)
	 total=total+25;
	 if(document.form1.SCSIHWR5_SAS_upgrade.checked)
	 total=total+50;
   }
   if(rad_val=="4x73SCSIHWR5")
   {
	   total=total+225; 
     var str1=document.form1.upgrade_4x7373SCSIHWR5.value;
	 if(str1=="147GB")
	 {
		total=total+125; 
	 }
	  if(str1=="300GB")
	 {
		total=total+250; 
	 }
	  if(str1=="36GB")
	 {
		total=total-40; 
	 }
	 
	 if(document.form1.SCSI4XHWR5_15K_upgrade.checked)
	 total=total+30;
	 if(document.form1.SCSI4XHWR5_SAS_upgrade.checked)
	 total=total+60;
   }	
     
   for (var i=0; i < document.form1.Hd2.length; i++)
   {
   if (document.form1.Hd2[i].checked)
      {
      var rad_val = document.form1.Hd2[i].value;
      }
   }

   if(rad_val=="120IDE_hd2")
   {
	   
     var str1=document.form1.upgrade_hd2_120IDE.value;
	 if(str1=="160GB")
	 {
		total=total+5; 
	 }
	  if(str1=="250GB")
	 {
		total=total+15; 
	 }
	  if(str1=="500GB")
	 {
		total=total+30; 
	 }
	  if(str1=="750GB")
	 {
		total=total+50; 
	 }
	  if(str1=="1000GB")
	 {
		total=total+70; 
	 }
	  if(str1=="74GBRAPTOR")
	 {
		total=total+20; 
	 }
   }
	
	 if(rad_val=="73SCSI_hd2")
   {
	   total=total+40; 
     var str1=document.form1.hd2_73SCSI_upgrade.value;
	if(str1=="147GB")
	 {
		total=total+30; 
	 }
	  if(str1=="300GB")
	 {
		total=total+80; 
	 }
	  if(str1=="36GB")
	 {
		total=total-10; 
	 }
	 
	 if(document.form1.SCSIHD2_15K_upgrade.checked)
	 total=total+10;
	 if(document.form1.SCSIHD2_SAS_upgrade.checked)
	 total=total+30;
   }
   if(rad_val=="NoHd2")
   {
	   total=total-5; 
   }
	
   for (var i=0; i < document.form1.RemoteBackup.length; i++)
   {
   if (document.form1.RemoteBackup[i].checked)
      {
      var rad_val = document.form1.RemoteBackup[i].value;
      }
   }

    if(rad_val=="LWGuardian")
   {
	   total=total+100; 
     var str1=document.form1.GuardianDiskSpace.value;
	if(str1=="Guardian100GB")
	 {
		total=total+0; 
	 }
	  if(str1=="Guardian250GB")
	 {
		total=total+50; 
	 }
	  if(str1=="Guardian500GB")
	 {
		total=total+150; 
	 }
	  if(str1=="Guardian1000GB")
	 {
	    total=total+350;
	 } 
	 
	 if(document.form1.GuardianMySQL.checked)
	 total=total+50;
	 if(document.form1.GuardianCPanel.checked)
	 total=total+0;
   }

    if(rad_val=="backup50")
   {
	   total=total+25;  
	 
	 if(document.form1.OffsiteBackup.checked)
	 total=total+0;
	 
   }
  
    if(rad_val=="backup100")
   {
	   total=total+50;  
	 
	 if(document.form1.OffsiteBackup.checked)
	 total=total+0;
	 
   }
 
   for (var i=0; i < document.form1.OS.length; i++)
   {
   if (document.form1.OS[i].checked)
      {
      var rad_val = document.form1.OS[i].value;
      }
   }

    if(rad_val=="W2K3Server")
   {
	   total=total+20; 
	    if(document.form1.W2K3Enterprise.checked)
	 total=total+15;
     var str1=document.form1.MSSQL.value;
	 if(str1=="MSSQLServerWorkgroup")
	 {
		total=total+75; 
	 }
	  if(str1=="MSSQLServerWorkgroupDualCPU")
	 {
		total=total+150; 
	 }
	  if(str1=="MSSQLServer2005")
	 {
		total=total+250; 
	 }
	  if(str1=="MSSQLServer2005DualCPU")
	 {
		total=total+500; 
	 }
	  if(str1=="MSSQLServer")
	 {
		total=total+250; 
	 }
	 if(str1=="MSSQLServerDualCPU")
	 {
		total=total+500; 
	 }
	  if(str1=="MSSQL250")
	 {
		total=total+30; 
	 }
	  if(str1=="MSSQL500")
	 {
		total=total+50; 
	 }
	 
   }
 
    for (var i=0; i < document.form1.ControlPanel.length; i++)
   {
   if (document.form1.ControlPanel[i].checked)
      {
      var rad_val = document.form1.ControlPanel[i].value;
      }
   }
  
   if(rad_val=="Cpanel")
   {
	   total=total+20; 
	    if(document.form1.ServerSecure.checked)
	 total=total+0;
	  if(document.form1.Fantastico.checked)
	 total=total+0;
    
	 
   }

   if(rad_val=="Plesk")
   {
	   total=total+20;	
     var str1=document.form1.PleskAddOn.value;
	 if(str1=="AppPack")
	 {
		total=total+5; 
	 }
	  if(str1=="PowerPack")
	 {
		total=total+10; 
	 } 
	 
   }
 
     for (var i=0; i < document.form1.Bandwidth.length; i++)
   {
   if (document.form1.Bandwidth[i].checked)
      {
      var rad_val = document.form1.Bandwidth[i].value;
      }
   }
  
   if(rad_val=="4000GB")
   {
	   if(document.form1.GigabitUplink.checked)
	 total=total+100;
   }

   if(rad_val=="10MbitUnmetered")
   {
	   total=total+100;	
     var str1=document.form1.upgrade_10MbitUnmetered.value;
	 if(str1=="20MbitUnmetered")
	 {
		total=total+300; 
	 }
	  if(str1=="30MbitUnmetered")
	 {
		total=total+600; 
	 }
	 if(str1=="50MbitUnmetered")
	 {
		total=total+1000; 
	 }
	  if(str1=="100MbitUnmetered")
	 {
		total=total+2000; 
	 }  
	 
   }
 
     for (var i=0; i < document.form1.SetupFee.length; i++)
   {
   if (document.form1.SetupFee[i].checked)
      {
      var rad_val = document.form1.SetupFee[i].value;
      }
   }
    if(rad_val=="setup150")
   {
   total=total-15;
   }
    if(rad_val=="setup250")
   {
   total=total-25;
   }
    if(rad_val=="setup350")
   {
   total=total-35;
   }
   document.getElementById("price1").innerHTML="Price: $"+total+"/mon";
   document.getElementById("price").innerHTML="Price: $"+total+"/mon";
   document.getElementById("totalvalue").value=total;
}
