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(',','')*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; // automatically populate gross fee for // package type switch (document.frmREG.NoM.value) { case "Workshop Package#WORKSHOP": theFee = "14,950.00"; break; case "Exhibition Package#EXHIBITION": theFee = "4,950.00"; break; case "PLM Lunch Sponsor#LUNCH SPNS": theFee = "8,950.00"; break; case "Silver#SILVER": theFee = "16,950.00"; break; case "Gold#GOLD": theFee = "26,950.00"; break; case "Platinum#PLATINUM": theFee = "34,950.00"; break; case "Online Package#ONLINE": theFee = "12500"; break; case "Drinks Reception Sponsor#DRINKS SPNS": theFee = "9,950.00"; break; case "Delegate Lounge Sponsor#SPONSORSHIP": theFee = "7,500.00"; break; case "Exhibition Visitor Bag Sponsor": theFee = "8,000.00"; break; case "Press Office Sponsor": theFee = "5,000.00"; break; case "Pre-reg competition Sponsor": theFee = "5,000.00"; break; case "Conference Delegate Bag Sponsor": theFee = "5,000.00"; break; case "Conference Pens & Pads": theFee = "4,000.00"; break; case "Exhibition Visitor Bag insert": theFee = "2,000.00"; break; case "You Are Here board sponsor": theFee = "2,000.00"; break; case "Delegate Bag Sponsor#BRFCASE SPNS": theFee = "5,000.00"; break; case "Catalogue Sponsor#CAT SPNS": theFee = "3,750.00"; break; case "Workshop Package#WORKSHOP": theFee = "12,950"; break; default: theFee = "0.00"; break; } // update fee box document.frmREG.Fee.value = theFee; // 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 theExtra; // automatically populate gross fee for delegate // package type switch (document.frmREG.Package.value) { case "Pre-event innovation tour#DELG": theFee = "1895.00"; break; case "Industry Delegate Package#DELG CONF": theFee = "695.00"; break; case "Early Bird Discount#DELG": theFee = "1695.00"; break; case "VIP Delegate Package#DELG": theFee = "1550.00"; break; case "Supplier Delegate Package#SUPP DELG": theFee = "2995.00"; break; default: theFee = "0.00"; break; } // add extra for Virtual Conference booking if (document.frmREG.virtual.checked) { theVC = parseFloat("395"); } else { theVC = parseFloat("0"); } // theFee = parseFloat(theFee) + theVC; //if (document.frmREG.extra.checked) //{ theExtra = 200; } //else //{ theExtra = 0; } // update fee box document.frmREG.Fee.value = ((theFee) * delNo) + theVC; //document.frmREG.Fee.value = ((theFee - theExtra) * delNo); // ensure tax and total is calculated checkFee(); }