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; 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)}; } //document.frmREG.VAT.value = (Math.round(document.frmREG.Fee.value.replace(',','')*0)); // 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(){ if(!document.frmREG.NoM) return false; var acom // automatically populate gross fee for // package type switch (document.frmREG.NoM.value) { case "Premium Conference Attendee Package": theFee = 4995.0; break; case "Silver": theFee = 19950.00; break; case "Gold": theFee = 29950.00; break; case "Platinum": theFee = 60950.00; break; case "Lead": theFee = 42950.00; break; case "Drinks Reception Sponsor": theFee = 1500.00; break; case "Delegate Bag Sponsor": theFee = 5000.0; break; case "Catalogue Sponsor": theFee = 5000.0; break; case "Exhibitor Package": theFee = 10450.00; break; case "Workshop Package": theFee = 18950.00; break; case "Gala Dinner Sponsor": theFee = 1500.00; break; case "Exclusive": theFee = 51350.00; break; case "VIP Delegate Package": theFee = "1995.00"; break; case "VIP Delegate Package (no CD Rom)": theFee = "1495.00"; break; case "VIP Delegate Package Discount": theFee = "995.00"; break; case "Award Category": theFee = 9950.00; break; case "Lead Award": theFee = 29950.00; break; case "Champagne Reception": theFee = 14950.00; break; case "Awards Menu and Wine Sponsor": theFee = 5950.00; break; case "Awards Table Sponsor": theFee = 2449.00; break; case "Post Ceremony Bar Sponsor": theFee = 9950.00; break; default: theFee = "0.00"; break; } // update fee box if (document.frmREG.exhibition.checked) { acom=250;} else { acom=0;} document.frmREG.Fee.value = theFee+acom; // ensure tax and total is calculated checkFee(); } function updateDelFee(delNo){ var theFee; // automatically populate gross fee for delegate // package type var acom switch (document.frmREG.Package.value) { case "VIP Delegate Package (Inc OnDemand)": theFee = 1495.00; break; case "VIP Delegate Package": theFee = 995.00; break; case "Vip OfferAMSVIP": theFee = 995.00; break; case "Premium Conference Attendee Package": theFee = 4995.00; break; default: theFee = 0.00; break; } // update fee box if (document.frmREG.exhibition.checked) { acom=250;} else { acom=0;} document.frmREG.Fee.value = ((theFee+acom) * delNo); // ensure tax and total is calculated checkFee(); }