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{ 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(){ var theFee; // automatically populate gross fee for // package type switch (document.frmREG.NoM.value) { case "Silver": theFee = "19,950.00"; break; case "Gold": theFee = "29,950.00"; break; case "Platinum": theFee = "60,150.00"; break; case "Exclusive Dinner Sponsorship": theFee = "51,350.00"; break; case "Lead Sponsor": theFee = "49,950.00"; break; case "Drinks Reception Sponsor": theFee = "14,950.00"; break; case "Delegate Bag Sponsor": theFee = "6,950.00"; break; case "Catalog Sponsor": theFee = "9,950.00"; break; case "Exhibitor Package": theFee = "7,950.00"; break; case "Workshop Package": theFee = "12,250.00"; break; default: theFee = "0.00"; break; } // update fee box document.frmREG.Fee.value = theFee; // ensure tax and total is calculated checkFee(); } function updateDelFee(delNo){ var theFee; // automatically populate gross fee for delegate // package type switch (document.frmREG.Package.value) { case "VIP Delegate Package": theFee = "1500.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(); } function updateVCfee(){ // automatically populate fee for Virtual Conference CDs based on // CDs number and discount from delegate booking form var theDiscount; var VCfee; var NoCD; VCfee = 750; NoCD = document.frmREG.T_NoCD.value; switch (document.frmREG.DiscountFlag.value) { case "dsc1": theDiscount = 250; break; case "dsc2": theDiscount = 625; break; case "dsc3": theDiscount = 1250; break; case "0": theDiscount = 0; break; default: theFee = 0; break; } // update fee box document.frmREG.T_TotalFee.value = (VCfee * NoCD) - theDiscount; }