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(){ if(!document.frmREG.NoM) return false; var theFee; // automatically populate gross fee for // package type switch (document.frmREG.NoM.value) { case "Silver#SILVER": theFee = "16950"; break; case "Gold#GOLD": theFee = "26950"; break; case "Summit Lead Sponsor#SUMMIT LEAD SPONSOR": theFee = "39950"; break; case "Platinum#PLATINUM": theFee = "26950"; break; case "Lead Sponsor#LD SPONSOR": theFee = "34950"; break; case "Drinks Reception Sponsor#LUNCH SPNS": theFee = "10000"; break; case "Online Package#ONLINE": theFee = "9950"; break; case "Delegate Bag Sponsor#BRFCASE SPNS": theFee = "5000"; break; case "Delegate Lounge Sponsor#SPONSORSHIP": theFee = "8950"; break; case "Web Catalogue Sponsor#CAT SPNS": theFee = "5000"; break; case "Exhibitor Package#EXHIBITOR": theFee = "8950"; break; case "Lead Awards Ceremony Partner#AWARDS": theFee = "29950"; break; case "Awards Category Sponsor#Cat SPONSOR": theFee = "9950"; break; case "Awards Champagne Reception Sponsor#AWARDS": theFee = "14950"; break; case "Awards Menu and Wine Sponsor#AWARDS": theFee = "5950"; break; case "On-site Networking package#DELG": theFee = "500"; break; case "Ceremony Table Sponsor#SPONSORSHIP": theFee = "2449"; break; case "Post Ceremony Bar Sponsor#POST SPNS": theFee = "9950"; break; case "Manufacturing Strategy Session Lunch Sponsor#LUNCH SPNS": theFee = "8250"; break; case "Workshop Package#WORKSHOP": theFee = "14950"; break; case "Show Guide Advert#SGADVERT": theFee = "995"; break; case "Supplier Delegate Package#SUPP DELG x 1": theFee = "2995"; break; case "Supplier Delegate Package#SUPP DELG x 2": theFee = "5990"; break; case "Supplier Delegate Package#SUPP DELG x 3": theFee = "8985"; break; case "Supplier Delegate Package#SUPP DELG": theFee = "2995"; break; case "Supplier Delegate (1)#SUP DEL": theFee = "2995"; break; case "Supplier Delegate (2)#SUP DEL": theFee = "5990"; break; case "Supplier Delegate (3)#SUP DEL": theFee = "8985"; break; case "Supplier Delegate (4)#SUP DEL": theFee = "11980"; break; default: theFee = "0"; break; } var theTicket // automatically add ticket price switch (document.frmREG.Tickets.value) { case "1": theTicket = 250; break; case "2": theTicket = 500; break; case "3": theTicket = 750; break; case "4": theTicket = 1000; break; case "5": theTicket = 1250; break; default: theTicket = 0; break; } theFee = parseFloat(theFee) + parseFloat(theTicket); // 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 theBird; var theExtra; // automatically populate gross fee for delegate // package type switch (document.frmREG.Package.value) { case "BMW Tour#DELG": theFee = "2295"; break; case "DHL Tour#DELG": theFee = "2295"; break; case "Industry Delegate Package#DELG CONF": theFee = "1295"; //this is in Euros break; // -- COMP BOOKING case "Industry Delegate Package -- COMP BOOKING#DELG CONF": theFee = "595"; //this is in Euros break; case "Supplier Delegate Package#SUPP DELG": theFee = "3250"; break; default: theFee = "0"; break; } // add extra for Virtual Conference booking if (document.frmREG.ondemand.checked) { theVC = parseFloat("395"); } else { theVC = parseFloat("0"); } // theFee = parseFloat(theFee) + theVC; //if (document.frmREG.spotme.checked) //{ theExtra = 100; } //else //{ theExtra = 0; } // Spotme has been removed for the timebeing --NR 26 Nov 08 //if (document.frmREG.bird.checked) //{ theBird = 200; } //else //{ theBird = 0; } // update fee box document.frmREG.Fee.value = (parseFloat(theFee) * delNo) + theVC; // ensure tax and total is calculated checkFee(); }