function checkFee(){ if(!IsInt(document.frmREG.Fee.value,true)){ alert('The fee must be a number.'); document.frmREG.Fee.value = ''; document.frmREG.VAT.value = ''; document.frmREG.TotalFee.value = ''; } else{ var srv = 0; var fee1; var combi; with (document.frmREG) { if (document.getElementById('ServiceCharge')) { ServiceCharge.value=(Fee.value.replace(',','')*svperc.value); srv=(parseFloat(Fee.value.replace(',','')*svperc.value)); } fee1=(parseFloat(Fee.value.replace(',',''))); combi=srv+fee1; if (VATexempt.checked) { VAT.value = 0; } else { VAT.value = (Math.round(combi*mytax.value)); VAT.value = VAT.value.substring(0,VAT.value.length-2) + '.' + VAT.value.substring(VAT.value.length-2,VAT.value.length); } if(VAT.value.length>6){ VAT.value = VAT.value.substring(0,VAT.value.length-6) + ',' + VAT.value.substring(VAT.value.length-6,VAT.value.length)}; TotalFee.value = (Math.round((combi*100)+(VAT.value.replace(',','')*100))); TotalFee.value = TotalFee.value.substring(0,TotalFee.value.length-2) + '.' + TotalFee.value.substring(TotalFee.value.length-2,TotalFee.value.length); if(TotalFee.value.length>6){ TotalFee.value = TotalFee.value.substring(0,TotalFee.value.length-6) + ',' + TotalFee.value.substring(TotalFee.value.length-6,TotalFee.value.length)}; } //if (document.frmREG.VATexempt.checked) { // document.frmREG.VAT.value = 0; // } // else { // document.frmREG.VAT.value = (Math.round(document.frmREG.Fee.value.replace(',','')*document.frmREG.mytax.value)); // document.frmREG.VAT.value = document.frmREG.VAT.value.substring(0,document.frmREG.VAT.value.length-2) + '.' + document.frmREG.VAT.value.substring(document.frmREG.VAT.value.length-2,document.frmREG.VAT.value.length); // } // // if(document.frmREG.VAT.value.length>6){ // document.frmREG.VAT.value = document.frmREG.VAT.value.substring(0,document.frmREG.VAT.value.length-6) + ',' + document.frmREG.VAT.value.substring(document.frmREG.VAT.value.length-6,document.frmREG.VAT.value.length)}; // // document.frmREG.TotalFee.value = (Math.round((document.frmREG.Fee.value.replace(',','')*100)+(document.frmREG.VAT.value.replace(',','')*100))); // document.frmREG.TotalFee.value = document.frmREG.TotalFee.value.substring(0,document.frmREG.TotalFee.value.length-2) + '.' + document.frmREG.TotalFee.value.substring(document.frmREG.TotalFee.value.length-2,document.frmREG.TotalFee.value.length); // if(document.frmREG.TotalFee.value.length>6){ // document.frmREG.TotalFee.value = document.frmREG.TotalFee.value.substring(0,document.frmREG.TotalFee.value.length-6) + ',' + document.frmREG.TotalFee.value.substring(document.frmREG.TotalFee.value.length-6,document.frmREG.TotalFee.value.length)}; } } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } function IsInt(checkStr,bReal) { var checkOK = "0123456789,"; var allValid = true; var allNum = ""; if (bReal){ checkOK = checkOK + '.';} for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } if (ch != ",") allNum += ch; } if (!allValid) { return false; } else return true; } function updateFee(){ var theFee; var theExtra; // automatically populate gross fee for // package type switch (document.frmREG.NoM.value) { case "Event Pens and Notepads#PENS": theFee = 3500.00; break; case "Networking Lunch#LUNCH": theFee = 14950.00; break; case "Delegate Lounge Sponsor#SPONSORSHIP": theFee = 12950.00; break; case "Platinum#PLATINUM": theFee = 26950.00; break; case "Silver#SILVER": theFee = 16950.00; break; case "Gold#GOLD": theFee = 23950.00; break; case "Exhibition#EXHIBITION": theFee = 8950.00; break; case "Workshop#WORKSHOP": theFee = 14950.00; break; case "Lead Category Sponsor#LD SPONSOR": theFee = 34950.00; break case "Summit Lead Sponsor#summLD SPONSOR": theFee = 48950.00; break; case "Event Sponsor#LD SPONSOR": theFee = 44950.00; break; case "Drinks Reception Sponsor#LUNCH SPNS": theFee = 9950; break; case "Delegate Bag Sponsor#BRFCASE SPNS": theFee = 4950; break; case "Web Catalogue and Show Guide Sponsor#CAT SPNS": theFee = 4995; break; case "WIFI#SPNS": theFee = 9950; break; case "Exhibitor Package#EXHIBITOR": theFee = 8950; break; case "RoundTable Discussions#ROUNDTABLE": theFee = 5150; break; case "Gala Dinner Sponsor#LUNCH SPNS": theFee=15000; break; case "Supplier Delegate (1)#SUP DEL": if (document.frmREG.T_BookCode.value =='sgvmk') { theFee = 2495; } else { theFee = 2995; } break; case "Supplier Delegate (2)#SUP DEL": if (document.frmREG.T_BookCode.value =='sgvmk') { theFee = 4990; } else { theFee = 5990; } break; case "Supplier Delegate (3)#SUP DEL": if (document.frmREG.T_BookCode.value =='sgvmk') { theFee = 7485; } else { theFee = 8985; } break; case "Supplier Delegate (4)#SUP DEL": if (document.frmREG.T_BookCode.value =='sgvmk') { theFee = 9980; } else { theFee = 11980; } break; default: theFee = 0.00; break; } theFee = parseFloat(theFee); // add the technical paper extra if (document.frmREG.paper.checked) { theExtra = parseFloat("1950"); //alert(theExtra); } else { theExtra = parseFloat("0"); } theFee = parseFloat(theFee); // update fee box document.frmREG.Fee.value = (theFee + theExtra); // ensure tax and total is calculated if (document.frmREG.NoM.value=="Online Package#ONLINE") { document.frmREG.VAT.value =0; document.frmREG.TotalFee.value=document.frmREG.Fee.value; } else { checkFee(); } } function updateDelFee(delNo){ var theFee; var theFee1d; var theFee2d; var theFee3d; var theFee4d; var theDiscount; // automatically populate gross fee for delegate // package type switch (document.frmREG.Package.value) { case "Industry Delegate Package#DELG": theFee = "1395.00"; break; case "Supplier Delegate Package#SUPP DELG": theFee = "2995.00"; break; case "Supplier Delegate Conference Package#SUPP DELGCONF": theFee = "1795.00"; break; case "Industry Delegate Package + 1 morning and 1 afternoon workshop#DELG": theFee = "1795.00"; break; case "Industry Delegate Package + any 1 workshop#DELG": theFee = "2195.00"; break; case "Delegate Registration Discount": theFee = "1195.00"; break; default: theFee = "0.00"; break; } if (document.frmREG.T_BrochureCode.value.toUpperCase() == "GREBF1") { theDiscount = parseFloat("0.5"); } else { theDiscount = parseFloat("1"); } if (document.frmREG.T_BrochureCode.value.toUpperCase() == "GREN") { theDiscount = 0.75; } else { theDiscount = 1; } if (document.frmREG.T_BrochureCode.value.toUpperCase() == "SG3") { theCashDiscount =parseFloat("200"); } else { theCashDiscount = parseFloat("0"); } // add extra for Virtual Conference booking if (document.frmREG.ondemand.checked) { theVC = parseFloat("395"); } else { theVC = parseFloat("0"); } // update fee box document.frmREG.Fee.value = (((((theFee) * delNo) * theDiscount)-theCashDiscount) + theVC); // ensure tax and total is calculated checkFee(); }