function currencyFormat( fAmount ){ var numberTest = new GeneralServer(fAmount); numberTest.gSetCurr(false); numberTest.gSetCommas(false); numberTest.gSetPlaces(2); var POUND = unescape('%A3'); numberTest.gSetCurrPrf(POUND); return(numberTest.gToFrmted()); } function dedicatedPack() { hiddenOpt(); var dChkOPS = document.getElementById("osCheck"); var dChkCPU = document.getElementById("cpuCheck"); var dChkRAM = document.getElementById("ramCheck"); var dChkHRD = document.getElementById("hdCheck"); var dTextSet = document.getElementById("cust_setup_text"); var dPriceSet = document.getElementById("cust_setup_price"); var basePrice = document.getElementById("basePrice"); var dValueSet = document.getElementById("setUp").value; var dNetPriceValue = document.getElementById("netPrice"); var dDedicatedServerID = document.getElementById("packageRef").value; var serverName = document.getElementById("packageRef"); var dDedicatedServerText = serverName.options[serverName.selectedIndex].text; var dDedicatedPackName = document.getElementById("package_name"); var hddPrice = document.getElementById("hddPrice").value; var ramPrice = document.getElementById("ramPrice").value; var netPrice = document.getElementById("net_price"); var cpuText = document.getElementById("cpu_text"); var ramText = document.getElementById("ram_text"); var hddText = document.getElementById("hdd_text"); var osText = document.getElementById("os_text"); var priceText = document.getElementById("price_text"); var cpu = document.getElementById("cpu"); var ram = document.getElementById("ram"); var hdd = document.getElementById("hdd"); var os = document.getElementById("os"); var price = document.getElementById("price"); var custom = document.getElementById("custom").value; var basePriceValue = '70.00' var helpText1 = '
The processor is the engine behind the server, choose one which will be able to cope with all the applications that you will require of it.
'; //cpu var helpText2 = '
You need extra Ram resources to be able to run the server smoothly, less ram means writing to hard drive which slows performance. 1 gig min recommended
'; //ram var helpText3 = '
Hard disk drives capacity is not a problem with modern drives, but for safety we advise running 2 drives for raid 1. You will never lose data with this configuration.
'; //hdd var helpText4 = '
Choose which operating system you wish to use on your server, remember that some games will release servers / patches for windows much earlier that for Linux. It is advisable to choose the operating system that you are most comfortable with.
'; //os var setUp = document.getElementById("setUp"); dDedicatedPackName.innerHTML = dDedicatedServerText; cpu.innerHTML = 'Minimum CPU '; ram.innerHTML = 'Minimum RAM '; hdd.innerHTML = 'Minimum HDD '; os.innerHTML = 'Operating System '; price.innerHTML = 'Price :'; switch(dDedicatedServerID){ case "1" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? Intel Pentium 4 HT (3.00 Ghz)'; ramText.innerHTML = 'what is this? Low (512 MB)'; hddText.innerHTML='what is this? Low (40 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£70.00'; netPrice.innerHTML = '£70.00'; dNetPriceValue.value = 70.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: Low (40 GB)','Ram: Low (512 MB)','Intel Pentium 4 HT (3.00 Ghz)') break; case "2" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? Intel Pentium D 840 (3.20 Ghz)'; ramText.innerHTML = 'what is this? High (2048 MB)'; hddText.innerHTML='what is this? High (200 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£120.00'; netPrice.innerHTML = '£120.00'; dNetPriceValue.value = 120.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: High (200 GB)','Ram: High (2048 MB)','Intel Pentium D 840 (3.20 Ghz)') break; case "3" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? AMD Opteron 270 (2.00 Ghz)'; ramText.innerHTML = 'what is this? High (2048 MB)'; hddText.innerHTML='what is this? High (200 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£290.00'; netPrice.innerHTML = '£290.00'; dNetPriceValue.value = 290.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: High (200 GB)','Ram: High (2048 MB)','AMD Opteron 270 (2.00 Ghz)') break; case "4" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? AMD Opteron 252 (2.60 Ghz)'; ramText.innerHTML = 'what is this? High (2048 MB)'; hddText.innerHTML='what is this? High (200 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£190.00'; netPrice.innerHTML = '£190.00'; dNetPriceValue.value = 190.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: High (200 GB)','Ram: High (2048 MB)','AMD Opteron 252 (2.60 Ghz)') break; case "9" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? AMD Athlon 64 3000 (1.80 Ghz)'; ramText.innerHTML = 'what is this? Low (512 MB)'; hddText.innerHTML='what is this? Low (40 GB)'; osText.innerHTML = 'what is this? Fedora '; priceText.innerHTML = '£1,070.00'; netPrice.innerHTML = '£1,070.00'; dNetPriceValue.value = 1,070.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Fedora','Hard Disk: Low (40 GB)','Ram: Low (512 MB)','AMD Athlon 64 3000 (1.80 Ghz)') break; case "10" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? AMD Athlon 64 3000 (1.80 Ghz)'; ramText.innerHTML = 'what is this? Low (512 MB)'; hddText.innerHTML='what is this? Low (40 GB)'; osText.innerHTML = 'what is this? Fedora '; priceText.innerHTML = '£100.00'; netPrice.innerHTML = '£100.00'; dNetPriceValue.value = 100.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Fedora','Hard Disk: Low (40 GB)','Ram: Low (512 MB)','AMD Athlon 64 3000 (1.80 Ghz)') break; case "11" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? Intel Xeon (2.40 Ghz)'; ramText.innerHTML = 'what is this? High (2048 MB)'; hddText.innerHTML='what is this? High (200 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£150.00'; netPrice.innerHTML = '£150.00'; dNetPriceValue.value = 150.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: High (200 GB)','Ram: High (2048 MB)','Intel Xeon (2.40 Ghz)') break; case "12" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? AMD Opteron 270 (2.00 Ghz)'; ramText.innerHTML = 'what is this? High (2048 MB)'; hddText.innerHTML='what is this? High (200 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£650.00'; netPrice.innerHTML = '£650.00'; dNetPriceValue.value = 650.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: High (200 GB)','Ram: High (2048 MB)','AMD Opteron 270 (2.00 Ghz)') break; case "14" : // set the hidden fileds to allow the page to be submitted dChkOPS.value = "true"; dChkCPU.value = "true"; dChkRAM.value = "true"; dChkHRD.value = "true"; basePrice.value= 0; dTextSet.innerHTML = ''; dPriceSet = ''; dValueSet = 0; hiddenOpt(); setUp.value = 0; cpuText.innerHTML='what is this? AMD Opteron 270 (2.00 Ghz)'; ramText.innerHTML = 'what is this? High (2048 MB)'; hddText.innerHTML='what is this? High (200 GB)'; osText.innerHTML = 'what is this? Windows XP '; priceText.innerHTML = '£650.00'; netPrice.innerHTML = '£650.00'; dNetPriceValue.value = 650.00; dDedicatedServerPayment(); dDedicatedServerPriceUpdate(); setTextValues('Windows XP','Hard Disk: High (200 GB)','Ram: High (2048 MB)','AMD Opteron 270 (2.00 Ghz)') break; case "-1" : dChkOPS.value = ""; dChkCPU.value = ""; dChkRAM.value = ""; dChkHRD.value = ""; // end set hiddenOpt(); dTextSet.innerHTML = 'Set Up Fee'; dPriceSet = '£0.00'; dValueSet = 0; basePrice.value = 70; //alert(basePrice.value); setUp.value = currencyFormat(0); cpuText.innerHTML='
'; cpuText.innerHTML += '
'; cpuText.innerHTML += '
' ramText.innerHTML = ''; hddText.innerHTML=''; osText.innerHTML = ''; custom = "true"; dNetPriceValue = 0; dDedicatedServerPayment(); break; } } function dDedicatedServerPriceUpdate(){ var netPrice = document.getElementById("netPrice"); var custPriceTxt = document.getElementById("cust_system_price"); var discountTotalTxt = document.getElementById("monthlyDiscountTotal"); var priceText = document.getElementById("price_text"); var totalText = document.getElementById("grand_total"); var custHDDPrice = document.getElementById("hddPrice"); var custRamPrice = document.getElementById("ramPrice"); var custOSPrice = document.getElementById("osPrice"); var custCPUPrice = document.getElementById("cpuPrice"); var selectedMonth = document.getElementById("selectedMonth"); var monthlyDiscount = document.getElementById("monthlyDiscount"); var netPriceText = document.getElementById("net_price"); var discountValueTxt = document.getElementById("discountValueTxt"); var setUpFee = document.getElementById("setUp").value; var basePrice = document.getElementById("basePrice").value; var totalPrice = parseFloat(currencyFormat(basePrice)) + parseFloat(currencyFormat(netPrice.value)) + parseFloat(currencyFormat(custCPUPrice.value)) + parseFloat(currencyFormat(custHDDPrice.value)) + parseFloat(currencyFormat(custRamPrice.value)) + parseFloat(currencyFormat(custOSPrice.value)); var grandTotal = parseFloat(currencyFormat(setUpFee)) + ((totalPrice) * (selectedMonth.value) * (monthlyDiscount.value)); var discountValue = ( ( totalPrice * selectedMonth.value ) - grandTotal ) / selectedMonth.value; var custPrice = totalPrice - parseFloat(currencyFormat(custOSPrice.value)); var monthPriceAfterDiscount = totalPrice - discountValue; grandTotal = '£'+currencyFormat(grandTotal); totalPrice = '£'+currencyFormat(totalPrice); custPrice = '£'+currencyFormat(custPrice); priceText.innerHTML = totalPrice; custPriceTxt.innerHTML = custPrice; netPriceText.innerHTML = totalPrice; totalText.innerHTML = grandTotal; discountTotal = parseFloat(discountValue) *selectedMonth.value; if(discountValue > 0){ discountValueTxt.innerHTML = '  £ -'+currencyFormat(discountTotal); discountTotalTxt.innerHTML = 'Monthly Price After Discount £' +currencyFormat(monthPriceAfterDiscount) } else { discountValueTxt.innerHTML = ''; discountTotalTxt.innerHTML = '' } } function hint(gHint) { document.getElementById("hinttext").innerHTML = gHint; } function dDedicatedServerPayment(){ var paymentText = document.getElementById("payment"); payment.innerHTML = '
Payment Terms
1 Month
3 Months (10% Discount)
6 Months (15% Discount)
12 Months (20% Discount)
' dDedicatedServerPriceUpdate(); } function hidePayment(){ var paymentText = document.getElementById("payment"); } function dDedicatedServerMainPriceUpdate(itemID,discountGiven){ var payTerm = document.getElementById("paymentterm").value; var payTermText = document.getElementById("payment_term_text"); var monthDiscount = document.getElementById("monthlyDiscount"); var selectedMonth = document.getElementById("selectedMonth"); monthDiscount.value = discountGiven; selectedMonth.value = itemID; var totalText = document.getElementById("grand_total"); switch(itemID){ case 1 : var discount = "1"; var discountText = 0; if(itemID > 1){ spanClass = '' discountText = 's ( '+discountText+'% Discount)' } else { discountText = ''; spanClass = ''; } payTermText.innerHTML = spanClass + '1 Month' + discountText + ''; dDedicatedServerPriceUpdate(); break; case 3 : var discount = "0.90"; var discountText = 10; if(itemID > 1){ spanClass = '' discountText = 's ( '+discountText+'% Discount)' } else { discountText = ''; spanClass = ''; } payTermText.innerHTML = spanClass + '3 Month' + discountText + ''; dDedicatedServerPriceUpdate(); break; case 6 : var discount = "0.85"; var discountText = 15; if(itemID > 1){ spanClass = '' discountText = 's ( '+discountText+'% Discount)' } else { discountText = ''; spanClass = ''; } payTermText.innerHTML = spanClass + '6 Month' + discountText + ''; dDedicatedServerPriceUpdate(); break; case 12 : var discount = "0.80"; var discountText = 20; if(itemID > 1){ spanClass = '' discountText = 's ( '+discountText+'% Discount)' } else { discountText = ''; spanClass = ''; } payTermText.innerHTML = spanClass + '12 Month' + discountText + ''; dDedicatedServerPriceUpdate(); break; } } function setOs(){ var dChkOPS = document.getElementById("osCheck"); var custOSPrice = document.getElementById("osPrice"); var custOS = document.getElementById("osOption").value; var custOSTxt = document.getElementById("osTxtValue"); switch(custOS){ case "4" : dChkOPS.value = "true"; document.getElementById("netPrice").value = 0; dDedicatedServerPriceUpdate(); setCustText('cust_os_text','cust_os_price','OS: Fedora','0.00'); custOSPrice.value = '0.00' custOSTxt.value = 'OS: Fedora' dDedicatedServerPriceUpdate(); break; case "3" : dChkOPS.value = "true"; document.getElementById("netPrice").value = 0; dDedicatedServerPriceUpdate(); setCustText('cust_os_text','cust_os_price','OS: Free BSD','0.00'); custOSPrice.value = '0.00' custOSTxt.value = 'OS: Free BSD' dDedicatedServerPriceUpdate(); break; case "2" : dChkOPS.value = "true"; document.getElementById("netPrice").value = 0; dDedicatedServerPriceUpdate(); setCustText('cust_os_text','cust_os_price','OS: Windows 2000','10.00'); custOSPrice.value = '10.00' custOSTxt.value = 'OS: Windows 2000' dDedicatedServerPriceUpdate(); break; case "1" : dChkOPS.value = "true"; document.getElementById("netPrice").value = 0; dDedicatedServerPriceUpdate(); setCustText('cust_os_text','cust_os_price','OS: Windows XP','15.00'); custOSPrice.value = '15.00' custOSTxt.value = 'OS: Windows XP' dDedicatedServerPriceUpdate(); break; } } function dDedicatedHRDSet(){ var dChkHRD = document.getElementById("hdCheck"); var custHDDPrice = document.getElementById("hddPrice"); var custHDD = document.getElementById("hddOption").value; var custHDDTxt = document.getElementById("osHddValue"); switch(custHDD){ case "1" : custHDDPrice.value = 5.00; custHDDTxt = 'HDD: Low (40 GB)'; dDedicatedCustomTextSet('cust_system_text_hdd', 'HDD: 40 GB'); dChkHRD.value="true"; break; case "2" : custHDDPrice.value = 10.00; custHDDTxt = 'HDD: Middle (120 GB)'; dDedicatedCustomTextSet('cust_system_text_hdd', 'HDD: 120 GB'); dChkHRD.value="true"; break; case "3" : custHDDPrice.value = 15.00; custHDDTxt = 'HDD: High (200 GB)'; dDedicatedCustomTextSet('cust_system_text_hdd', 'HDD: 200 GB'); dChkHRD.value="true"; break; } dDedicatedServerPriceUpdate() } function dDedicatedCpuSet(setPrice,setName){ var dChkCPU = document.getElementById("cpuCheck"); var custCPUPrice = document.getElementById("cpuPrice"); var custCPUTxt = document.getElementById("cpuTxtValue"); custCPUPrice.value = setPrice; custCPUTxt.value = setName; dDedicatedCustomTextSet('cust_system_text_cpu', 'System: '+setName+' || '); dChkCPU.value="true"; dDedicatedServerPriceUpdate(); } function dDedicatedServerRamSet(){ var custRamPrice = document.getElementById("ramPrice"); var custRam = document.getElementById("ramOption").value; var dChkRAM = document.getElementById("ramCheck"); switch(custRam){ case "1" : custRamPrice.value = '7.50'; dDedicatedCustomTextSet('cust_system_text_ram',' RAM: 512 MB || '); dChkRAM.value = "true" break; case "2" : custRamPrice.value = '15.00'; dDedicatedCustomTextSet('cust_system_text_ram',' RAM: 1024 MB || '); dChkRAM.value = "true" break; case "3" : custRamPrice.value = '25.00'; dDedicatedCustomTextSet('cust_system_text_ram',' RAM: 2048 MB || '); dChkRAM.value = "true" break; } dDedicatedServerPriceUpdate() } function dDedicatedCustomTextSet(itemID,itemTxt){ var dCustomTxtSet = document.getElementById("cust_setup_text"); var dCustomPriceSet = document.getElementById("cust_setup_price"); document.getElementById(itemID).innerHTML = itemTxt; dCustomTxtSet.innerHTML = 'Set Up' dCustomPriceSet.innerHTML = '£0' } function hiddenOpt(){ document.getElementById("ramPrice").value = 0; document.getElementById("netPrice").value = 0; document.getElementById("cpu_text").innerHTML = ' '; document.getElementById("cpuPrice").value = 0; document.getElementById("hddPrice").value = 0; document.getElementById("cpuName").innerHTML = ' '; document.getElementById("osPrice").value = 0; document.getElementById("cust_os_text").innerHTML = ' '; document.getElementById("cust_os_price").innerHTML = ' '; document.getElementById("price_text").innerHTML = ' '; document.getElementById("cust_system_text_hdd").innerHTML = ' '; document.getElementById("cust_system_text_cpu").innerHTML = ' '; document.getElementById("cust_system_text_ram").innerHTML = ' '; dDedicatedServerPriceUpdate(); } function dDedicatedCPUShowSet() { var s = 0; var cpuItem = new Array(); //name brandID dualCore dualProcessor price cpuID cpuItem[s++] = ['Athlon 64 3000 (1.80 Ghz)','1','N','N','0.00','a64.jpg','13']; cpuItem[s++] = ['Athlon 64 3200 (2.00 Ghz)','1','N','N','5.00','a64.jpg','14']; cpuItem[s++] = ['Athlon 64 3500 (2.20 Ghz)','1','N','N','15.00','a64.jpg','15']; cpuItem[s++] = ['Athlon 64 4000 (2.40 Ghz)','1','N','N','25.00','a64.jpg','16']; cpuItem[s++] = ['Athlon 64 X2 4200 (2.20 Ghz)','1','Y','N','35.00','a64X2.jpg','17']; cpuItem[s++] = ['Athlon 64 X2 4400 (2.20 Ghz)','1','Y','N','43.50','a64X2.jpg','18']; cpuItem[s++] = ['Athlon 64 X2 4600 (2.40 Ghz)','1','Y','N','51.50','a64X2.jpg','19']; cpuItem[s++] = ['Athlon 64 X2 4800 (2.40 Ghz)','1','Y','N','70.00','a64X2.jpg','20']; cpuItem[s++] = ['Opteron 242 (1.60 Ghz)','1','N','Y','20.00','opteron.jpg','21']; cpuItem[s++] = ['Opteron 244 (1.80 Ghz)','1','N','Y','39.50','opteron.jpg','22']; cpuItem[s++] = ['Opteron 246 (2.00 Ghz)','1','N','Y','42.00','opteron.jpg','23']; cpuItem[s++] = ['Opteron 248 (2.20 Ghz)','1','N','Y','50.50','opteron.jpg','28']; cpuItem[s++] = ['Opteron 250 (2.40 Ghz)','1','N','Y','100.00','opteron.jpg','0']; cpuItem[s++] = ['Opteron 252 (2.60 Ghz)','1','N','Y','120.00','opteron.jpg','24']; cpuItem[s++] = ['Opteron 265 (1.80 Ghz)','1','Y','Y','125.50','opteron.jpg','29']; cpuItem[s++] = ['Opteron 270 (2.00 Ghz)','1','Y','Y','150.00','opteron.jpg','30']; cpuItem[s++] = ['Pentium 4 HT (2.80 Ghz)','2','N','N','12.50','p4.jpg','26']; cpuItem[s++] = ['Pentium 4 HT (3.00 Ghz)','2','N','N','12.50','p4.jpg','1']; cpuItem[s++] = ['Pentium 4 HT (3.20 Ghz)','2','N','N','14.50','p4.jpg','2']; cpuItem[s++] = ['Pentium 4 HT (3.40 Ghz)','2','N','N','16.50','p4.jpg','25']; cpuItem[s++] = ['Pentium D 820 (2.80 Ghz)','2','Y','N','17.50','pd.jpg','3']; cpuItem[s++] = ['Pentium D 830 (3.00 Ghz)','2','Y','N','24.00','pd.jpg','4']; cpuItem[s++] = ['Pentium D 840 (3.20 Ghz)','2','Y','N','38.00','pd.jpg','5']; cpuItem[s++] = ['Xeon (2.40 Ghz)','2','N','Y','20.00','xeon.jpg','6']; cpuItem[s++] = ['Xeon (2.80 Ghz)','2','N','Y','32.00','xeon.jpg','7']; cpuItem[s++] = ['Xeon (3.00 Ghz)','2','N','Y','40.00','xeon.jpg','8']; cpuItem[s++] = ['Xeon (3.60 Ghz)','2','N','Y','100.00','xeon.jpg','9']; document.getElementById("cpuName").value = ''; document.getElementById("dualCore").value = document.getElementById("dualCore").value.toUpperCase(); document.getElementById("dualProcessor").value = document.getElementById("dualProcessor").value.toUpperCase(); if (document.getElementById("cpuBrand").value == '') return; if ("12".indexOf(document.getElementById("cpuBrand").value) < 0) { alert("Invalid CPU Brand!"); return; } if (document.getElementById("dualCore").value == '') return; if ('YN'.indexOf(document.getElementById("dualCore").value) < 0) { //alert('Invalid Dual Core!'); return; } if (document.getElementById("dualProcessor").value == '') return; if ("YN".indexOf(document.getElementById("dualProcessor").value) < 0) { alert('Invalid Dual Processor!'); return; } var item = "Please select A CPU from below" for (var i=1; i'+cpuItem[i][0]; } } } } document.getElementById("cpuName").innerHTML = item; } function setCustText(custDivName,custDivPrice,itemName,itemPrice){ document.getElementById(custDivName).innerHTML = itemName; document.getElementById(custDivPrice).innerHTML = '£'+itemPrice; dDedicatedServerPriceUpdate() } function setTextValues(os,hdd,ram,cpu){ document.getElementById("osTxtValue").value = os; document.getElementById("cpuTxtValue").value = cpu; document.getElementById("ramTxtValue").value = ram; document.getElementById("hddTxtValue").value = hdd; } function setupPage(){ document.getElementById("packageRef").value = 0; document.getElementById("cpuName").innerHTML = ''; document.getElementById("price_text").innerHTML = ''; document.getElementById("net_price").innerHTML = ''; document.getElementById("grand_total").innerHTML = ''; document.getElementById("monthlyDiscountTotal").innerHTML = ''; document.getElementById("discountValueTxt").innerHTML = ''; document.getElementById("netPrice").value = 0; document.getElementById("selectedMonth").value = 1; document.getElementById("monthlyDiscount").value = 1; }