(function(b,e,g,f){function a(){this.init()}var c={Math:{Decimal:{DefaultFormat:{Int:18,Dec:6},ProcedureFormat:{Intermedium:2,Total:2},RoundingMode:BigDecimal.ROUND_HALF_UP,Overflows:{To:f,Limit:{Int:21,Dec:6}}}}};a.prototype={init:function(){b.extend(this,c,{})},setProcedureFormat:function(b,a){this.Math.Decimal.ProcedureFormat.Intermedium=b||2;this.Math.Decimal.ProcedureFormat.Total=a||2},setDecimalSettings:function(b){this.Math.Decimal.DefaultFormat=b.DefaultFormat;this.Math.Decimal.Overflows.Limit=
b.Overflows}};b.extend({settings:new a})})(jQuery,window,document);(function(b,e,g,f){b.extend({formatTotalValue:function(a){return b.format(a,"n"+b.settings.Math.Decimal.ProcedureFormat.Total)},formatIntermediumValue:function(a){return b.format(a,"n"+b.settings.Math.Decimal.ProcedureFormat.Intermedium)}})})(jQuery,window,document);
(function(b,e,g,f){b.extend({sumDecimals:function(a,c){var d=a.add(c);d.mant.length-Math.abs(d.exp)>b.settings.Math.Decimal.Overflows.Limit.Int&&(d=b.settings.Math.Decimal.Overflows.To,alert(NextWay.Localization.JavascriptOverflowErrorText));return d},multiplyDecimals:function(a,c){var d=a.multiply(c);d.mant.length-Math.abs(d.exp)>b.settings.Math.Decimal.Overflows.Limit.Int&&(d=b.settings.Math.Decimal.Overflows.To,alert(NextWay.Localization.JavascriptOverflowErrorText));return d},roundNumber:function(a,
c){if("number"===typeof value){c=Math.abs(parseInt(c))||0;var d=Math.pow(10,c);return Math.round(a*d)/d}value instanceof BigDecimal&&(Math.abs(parseInt(c)),a.round(b.settings.Math.Decimal.DefaultFormat.Int+decimalPlaces,b.settings.Math.Decimal.RoundingMode))}})})(jQuery,window,document);
(function(b,e,g,f){b.fn.lookup=function(a){var c={setvalue:function(b){var a=this.find("input:hidden"),c=this.find("input:text");c&&c.val(b.Text);a&&a.val(b.Value);b.TriggerChange&&a&&a.change()}};if(c[a])return c[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&a)b.error("Method "+a+" does not exist on lookup plugin");else return c.init.apply(this,arguments)};b.fn.multipleChoice=function(a){function c(a){var c=a.data;c.CheckBoxMode&&(a=b(a.target),c=b("#"+c.SelectId),
a.prop("checked")?(c.find("option[value='']").remove(),c.append(b("<option>",{selected:!0,value:a.val(),text:a.val()}))):(c.find("option[value='"+a.val()+"']").remove(),0==c.find("option").length&&c.append(b("<option>",{selected:!0,value:""}))))}var d={CheckBoxMode:!0,SelectId:f},e={init:function(a){var e=b(this);a=b.extend({},d,a);e.data("multiple-choice",a);e.delegate("input:checkbox","change",a,c)}};if(e[a])return e[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&
a)b.error("Method "+a+" does not exist on multipleChoice plugin");else return e.init.apply(this,arguments)}})(jQuery,window,document);
