function RebateCalc(){this.RebatePV=0;this.Message=""}RebateCalc.prototype.UpdateRebatePV=function(){var A=document.getElementById("rebate_perc").value;this.RebatePV=parseFloat(A);this.Message="<p style='color:red'>";if(isNaN(this.RebatePV)){this.Message+="Your rebate could not be determined. Please see the 'Rebates' tab for more information";this.RebatePV=0}else{this.Message+='Your rebate is calculated based on the information in the "Rebate(%)" field on the "Settings" tab above. Please see the "Rebates" tab for more information'}this.Message+="</p>"};RebateCalc.prototype.CalcRebate=function(A){return formatCurrency(Math.round(A*this.RebatePV))};var rcalc=new RebateCalc();