0?f+" "+(f>=this.MAX_WITHDRAW_YEARS?this.MSG_PLUS+" ":"")+(f==1?KJE.MSG_YEAR_LBL:KJE.MSG_YEARS_LBL):"")+(c||(f>0&&a>0)?" "+KJE.MSG_AND_LBL+" ":"")+(c||a>0?a+" "+(a==1?b:d):"")};KJE.showCode=function(e,h,d,b){var g=b;if(!d){var c=g.indexOf(e);var a=g.indexOf(h);var f="";while(c>0&&a>c){f+=g.substring(0,c);f+=g.substring(a+h.length);c=g.indexOf(e);a=g.indexOf(h)}g=(f==""?b:f)}g=KJE.replace(e,"",g);g=KJE.replace(h,"",g);return g};KJE.InvestmentAccountCalc.WITHDRAW_PRESERVE_PERCENT=0;KJE.InvestmentAccountCalc.WITHDRAW_PRESERVE_AMOUNT=1;KJE.InvestmentAccountCalc.WITHDRAW_ZERO_BALANCE=2;KJE.InvestmentAccountCalc.WITHDRAW_PERIODIC_AMOUNT=3;KJE.InvestmentAccountCalc.WITHDRAW_TYPES=KJE.parameters.get("ARRAY_WITHDRAW_TYPES",["Principal preservation percent","Principal preservation fix-ed amount","Zero ending balance","periodic amount"]);KJE.InvestmentAccountCalc.WITHDRAW_INDEXES=[0,1,2,3];KJE.InvestmentAccountCalc.WITHDRAW_SHORT_TYPES=KJE.parameters.get("ARRAY_WITHDRAW_SHORT_TYPES",["Maximum withdrawal","Years balance with last"]);KJE.InvestmentAccountCalc.WITHDRAW_SHORT_INDEXES=[KJE.InvestmentAccountCalc.WITHDRAW_ZERO_BALANCE,KJE.InvestmentAccountCalc.WITHDRAW_PERIODIC_AMOUNT];KJE.InvestmentAccountCalc.INFLATION_NO_ADJUST=0;KJE.InvestmentAccountCalc.INFLATION_ADJUST=1;KJE.InvestmentAccountCalc.INFLATION_ADJUST_IMMEDIATE=2;KJE.InvestmentAccountCalc.WITHDRAW_INFLATION_TYPES=KJE.parameters.get("ARRAY_WITHDRAW_INFLATION_TYPES",["No adjustment","Adjustments begin with withdrawals","Adjustments begin immediately"]);KJE.InvestmentAccountCalc.WITHDRAW_INFLATION_INDEXES=[KJE.InvestmentAccountCalc.INFLATION_NO_ADJUST,KJE.InvestmentAccountCalc.INFLATION_ADJUST,KJE.InvestmentAccountCalc.INFLATION_ADJUST_IMMEDIATE];KJE.InvestmentAccountCalc.CONTRIB_INFLATION_TYPES=KJE.parameters.get("ARRAY_CONTRIB_INFLATION_TYPES",["No adjustment","Annually for inflation"]);KJE.InvestmentAccountCalc.CONTRIB_INFLATION_INDEXES=[KJE.InvestmentAccountCalc.INFLATION_NO_ADJUST,KJE.InvestmentAccountCalc.INFLATION_ADJUST];KJE.InvestmentAccountCalc.ACCT_401K=0;KJE.InvestmentAccountCalc.ACCT_TRADITIONAL_IRA=1;KJE.InvestmentAccountCalc.ACCT_ROTH_IRA=2;KJE.InvestmentAccountCalc.ACCT_OTHER_TAX_DEFERRED=3;KJE.InvestmentAccountCalc.ACCT_FIXED_ANNUITIES=4;KJE.InvestmentAccountCalc.ACCT_VARIABLE_ANNUTIES=5;KJE.InvestmentAccountCalc.ACCT_TAX_EXEMPT_BONDS=6;KJE.InvestmentAccountCalc.ACCT_TAX_EXEMPT_MUTUAL_FUNDS=7;KJE.InvestmentAccountCalc.ACCT_OTHER_TAX_EXEMPT=8;KJE.InvestmentAccountCalc.ACCT_LONGTERM_STOCKS=9;KJE.InvestmentAccountCalc.ACCT_SHORTTERM_STOCKS=10;KJE.InvestmentAccountCalc.ACCT_TAXABLE_BONDS=11;KJE.InvestmentAccountCalc.ACCT_SAVINGS_ACCOUNTS=12;KJE.InvestmentAccountCalc.ACCT_STOCK_MUTUAL_FUNDS=13;KJE.InvestmentAccountCalc.ACCT_BOND_MUTUAL_FUNDS=14;KJE.InvestmentAccountCalc.ACCT_MONEY_MARKET=15;KJE.InvestmentAccountCalc.ACCT_SAVINGS_BONDS=16;KJE.InvestmentAccountCalc.ACCT_OTHER_TAXABLE=17;KJE.InvestmentAccountCalc.ACCT_REALESTATE=18;KJE.InvestmentAccountCalc.ACCT_OTHER_FIXED_ASSETS=19;KJE.InvestmentAccountCalc.ACCT_OTHER=20;KJE.InvestmentAccountCalc.ACCOUNT_TYPES=["401(k)s and 403(b)s","Traditional IRAs","ROTH IRAs","Other tax-deferred","Fixed annuities","Variable annuities","Tax-exempt bonds","Tax-exempt mutual funds","Other tax-exempt","Long-term stocks","Short-term stocks","Taxable Bonds","Savings Accounts and CDs","Stock mutual funds","Bond mutual funds","Money market funds","Savings bonds","Other taxable","Real estate","Other fixed assets","Other"];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER=new Array();KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[0]=[false,false,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[1]=[false,false,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[2]=[false,true,false,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[3]=[false,true,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[4]=[false,true,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[5]=[false,true,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[6]=[false,true,false,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[7]=[false,true,false,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[8]=[false,true,false,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[9]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[10]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[11]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[12]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[13]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[14]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[15]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[16]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[17]=[true,true,true,false];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[18]=[false,true,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[19]=[false,true,false,true];KJE.InvestmentAccountCalc.ACCOUNT_DEFAULT_CHARACTER[20]=[true,true,true,true];KJE.InvestmentAccountCalc.WITHDRAW_INDEXES=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];KJE.CalcName="Donations to the People In Need, Inc. Endowment Fund";KJE.CalcType="PINEndowment";KJE.CalculatorTitleTemplate="KJE1";KJE.parseInputs=function(b){if(!KJE.parameters.get("SHOW_DISTRIBUTION_ONLY",false)){var a=KJE.getDropBox("CONTRIB_FREQUENCY",KJE.parameters.get("CONTRIB_FREQUENCY",KJE.Default.FREQ_MONTHLY),KJE.Default.FREQUENCY_INDEXES,KJE.Default.FREQUENCY_TYPES_CAP);b=KJE.replace("**CONTRIB_FREQUENCY**",a,b);a=KJE.getDropBox("CONTRIB_ADJUST_FOR_INFLATION",KJE.parameters.get("CONTRIB_ADJUST_FOR_INFLATION",KJE.InvestmentAccountCalc.INFLATION_NO_ADJUST),KJE.InvestmentAccountCalc.CONTRIB_INFLATION_INDEXES,KJE.InvestmentAccountCalc.CONTRIB_INFLATION_TYPES);b=KJE.replace("**CONTRIB_ADJUST_FOR_INFLATION**",a,b);a=KJE.getDropBox("WITHDRAW_ADJUST_FOR_INFLATION",KJE.parameters.get("WITHDRAW_ADJUST_FOR_INFLATION",KJE.InvestmentAccountCalc.INFLATION_NO_ADJUST),KJE.InvestmentAccountCalc.WITHDRAW_INFLATION_INDEXES,KJE.InvestmentAccountCalc.WITHDRAW_INFLATION_TYPES);b=KJE.replace("**WITHDRAW_ADJUST_FOR_INFLATION**",a,b)}else{a=KJE.getDropBox("WITHDRAW_ADJUST_FOR_INFLATION",KJE.parameters.get("WITHDRAW_ADJUST_FOR_INFLATION",KJE.InvestmentAccountCalc.INFLATION_NO_ADJUST),KJE.InvestmentAccountCalc.CONTRIB_INFLATION_INDEXES,KJE.InvestmentAccountCalc.CONTRIB_INFLATION_TYPES);b=KJE.replace("**WITHDRAW_ADJUST_FOR_INFLATION**",a,b)}a=KJE.getDropBox("WITHDRAW_FREQUENCY",KJE.parameters.get("WITHDRAW_FREQUENCY",KJE.Default.FREQ_MONTHLY),KJE.Default.FREQUENCY_INDEXES,KJE.Default.FREQUENCY_TYPES_CAP);b=KJE.replace("**WITHDRAW_FREQUENCY**",a,b);a=KJE.getDropBox("WITHDRAW_TYPE",KJE.parameters.get("WITHDRAW_TYPE",KJE.InvestmentAccountCalc.WITHDRAW_ZERO_BALANCE),KJE.InvestmentAccountCalc.WITHDRAW_SHORT_INDEXES,KJE.InvestmentAccountCalc.WITHDRAW_SHORT_TYPES);b=KJE.replace("**WITHDRAW_TYPE**",a,b);return b};KJE.initialize=function(){KJE.CalcControl=new KJE.InvestmentAccountCalc();KJE.GuiControl=new KJE.InvestmentDistribution(KJE.CalcControl)};KJE.InvestmentDistribution=function(j){var d=KJE;var b=KJE.gLegend;var g=KJE.inputs.items;this.MSG_GRAPH1=KJE.parameters.get("MSG_GRAPH1","Existing balance");this.bShowDistributionOnly=KJE.parameters.get("SHOW_DISTRIBUTION_ONLY",false);this.MSG_PLUS=KJE.parameters.get("MSG_PLUS","plus");this.MSG_GRAPH_LABEL1=KJE.parameters.get("MSG_GRAPH_LABEL1","Existing balance");this.MSG_BALANCE_BY_YEAR=KJE.parameters.get("MSG_BALANCE_BY_YEAR","Balance by Year");j.CONTRIB_BEGIN_PERIOD=true;j.WITHDRAW_BEGIN_PERIOD=true;KJE.NumberSlider("CURRENT_AGE","Current age",0,100,0);KJE.InflationRateSlider("INFLATION_RATE","Expected annual inflation rate");KJE.DollarSlider("CONTRIB_STARTING_BALANCE","Starting balance",0,100000000,0,0,4);KJE.DollarSlider("CONTRIB_AMOUNT","Amount to contribute",0,100000000,0,0,1);KJE.InputItem.AltHelpName="ANNUAL_ROR";KJE.InvestRateSlider("CONTRIB_ANNUAL_ROR","Annual return");KJE.InvestRateSlider("WITHDRAW_ANNUAL_ROR","Annual return");KJE.InputItem.AltHelpName=null;KJE.NumberSlider("CONTRIB_YEARS","Years to contribute",0,100,0);KJE.NumberSlider("WITHDRAW_YEARS","Withdrawals to last",1,100,0);KJE.DollarSlider("WITHDRAW_AMOUNT","Amount to withdraw",0,100000000,j.iDecimal,0,3);KJE.DropBox("CONTRIB_FREQUENCY","Contribution frequency");KJE.DropBox("WITHDRAW_FREQUENCY","Withdrawal frequency");KJE.DropBox("WITHDRAW_ADJUST_FOR_INFLATION","Inflation adjustment");KJE.DropBox("WITHDRAW_TYPE","Calculate");KJE.DropBox("CONTRIB_ADJUST_FOR_INFLATION","Inflation adjustment");KJE.Label("WITHDRAW_STARTING_BALANCE","Withdrawal beginning balance");var h=KJE.gNewGraph(KJE.gLINE,"GRAPH1",true,false,KJE.colorList[1],KJE.parameters.get("MSG_GRAPH_TITLE","Balance by Year"));if(h){h._legend.setVisible(false);h._titleXAxis.setText(KJE.parameters.get("MSG_GRAPH_XAXIS","Age"))}if(!this.bShowDistributionOnly){var a=KJE.parameters.get("MSG_DROPPER_TITLE","Contribution information:");var c=KJE.parameters.get("MSG_DROPPER_CLOSETITLE","Total savings KJE1");var e=function(){return a};KJE.addDropper(new KJE.Dropper("INPUTS",true,e,e),KJE.colorList[0])}var k=KJE.parameters.get("MSG_DROPPER2_TITLE","Withdrawal information:");var f=KJE.parameters.get("MSG_DROPPER2_CLOSETITLE","Total savings KJE1");var i=function(){return k};KJE.addDropper(new KJE.Dropper("INPUTS2",true,i,i),KJE.colorList[0])};KJE.InvestmentDistribution.prototype.setValues=function(b){var a=KJE.inputs.items;b.WITHDRAW_TYPE=Math.round(a.WITHDRAW_TYPE.getValue());if(b.WITHDRAW_TYPE==KJE.InvestmentAccountCalc.WITHDRAW_ZERO_BALANCE){a.WITHDRAW_AMOUNT.disable(true);a.WITHDRAW_YEARS.enable();b.WITHDRAW_YEARS=a.WITHDRAW_YEARS.getValue()}else{a.WITHDRAW_AMOUNT.enable();a.WITHDRAW_YEARS.disable(true);b.WITHDRAW_AMOUNT=a.WITHDRAW_AMOUNT.getValue();b.WITHDRAW_YEARS=-1}if(this.bShowDistributionOnly){b.CONTRIB_YEARS=0;b.CONTRIB_ADJUST_FOR_INFLATION=false;b.CONTRIB_AMOUNT=0;b.CONTRIB_FREQUENCY=0;b.CONTRIB_ANNUAL_ROR=0;b.CURRENT_AGE=0}else{b.CONTRIB_YEARS=a.CONTRIB_YEARS.getValue();b.CONTRIB_ADJUST_FOR_INFLATION=Math.round(a.CONTRIB_ADJUST_FOR_INFLATION.getValue());b.CONTRIB_AMOUNT=a.CONTRIB_AMOUNT.getValue();b.CONTRIB_FREQUENCY=Math.round(a.CONTRIB_FREQUENCY.getValue());b.CONTRIB_ANNUAL_ROR=a.CONTRIB_ANNUAL_ROR.getValue()/100;b.CURRENT_AGE=a.CURRENT_AGE.getValue()}b.INFLATION_RATE=a.INFLATION_RATE.getValue()/100;b.CONTRIB_TAX_RATE=0;b.CONTRIBUTE_TO_MAXIMUM=false;b.CONTRIB_STARTING_BALANCE=a.CONTRIB_STARTING_BALANCE.getValue();b.WITHDRAW_TAX_RATE=0;b.WITHDRAW_FREQUENCY=Math.round(a.WITHDRAW_FREQUENCY.getValue());b.WITHDRAW_ANNUAL_ROR=a.WITHDRAW_ANNUAL_ROR.getValue()/100;b.WITHDRAW_ADJUST_FOR_INFLATION=Math.round(a.WITHDRAW_ADJUST_FOR_INFLATION.getValue())};KJE.InvestmentDistribution.prototype.refresh=function(e){var d=KJE;var c=KJE.gLegend;var b=KJE.inputs.items;var a=KJE.gGraphs[0];KJE.setTitleTemplate(e.WITHDRAW_RESULT_DESC);if(a){a.removeAll();a.setGraphCategories(e.cats);a.add(new KJE.gGraphDataSeries(e.DF_BALANCE,this.MSG_GRAPH1,a.getColor(1)));a.paint()}if(e.WITHDRAW_TYPE==KJE.InvestmentAccountCalc.WITHDRAW_ZERO_BALANCE){b.WITHDRAW_AMOUNT.setValue(e.WITHDRAW_AMOUNT_CALC,true)}else{b.WITHDRAW_YEARS.setValue((e.WITHDRAW_RUNOUT>=e.MAX_WITHDRAW_YEARS?e.WITHDRAW_RUNOUT:e.WITHDRAW_RUNOUT),true)}if(!this.bShowDistributionOnly){b.WITHDRAW_STARTING_BALANCE.setText(d.dollars(e.WITHDRAW_STARTING_BALANCE,e.iDecimal),true)}};KJE.parameters.set("MSG_GRAPH_XAXIS","Year");KJE.parameters.set("MSG_REPORT_COL1","Year");KJE.parameters.set("MSG_REPORT_COL3","Distributions");KJE.parameters.set("MSG_WITHDRAW_ADJUST_FOR_INFLATION","Increase distributions annually");KJE.parameters.set("MSG_WITHDRAW_AMOUNT","Amount of distribution");KJE.parameters.set("MSG_WITHDRAW_FREQUENCY","Distribution frequency");KJE.parameters.set("MSG_WITHDRAW_INFLATIONADJUST","Your distributions were increased annually at a projected MSG_INFLATION rate of inflation.");KJE.parameters.set("MSG_WITHDRAW_TITLE3","Distributions Calculated as:");KJE.parameters.set("MSG_WITHDRAW_YEARS","Years of distributions");KJE.parameters.set("MSG_DROPPER2_TITLE","Distribution information:");KJE.InvestmentAccountCalc.WITHDRAW_SHORT_TYPES=["Yearly Distribution to PIN and the Community","Years your gift to PIN will last"];KJE.parameters.set("MSG_CONTRIB_STARTING_BALANCE","Your gift to PIN");KJE.Default.RORRetire=4;KJE.Default.InflationRate=2;KJE.parameters.set("SHOW_DISTRIBUTION_ONLY",true);KJE.InputScreenText=" ";KJE.DefinitionText=" CalculateSelect \"Yearly Distribution to PIN and the Community.\" This will calculate the amount of money that PIN will periodically receive based on the model inputs. Your gift to PINThis is the total amount that you wish to place in the PIN Endowment Fund for the long term betterment of Delaware County. Amount of distributionThis is the calculated amount available to PIN on an annual basis. Years of distributionsFor planning purposes, PIN uses a 25 year distribution period. The actual distribution period may vary. Annual returnFor planning purposes, PIN uses a 4% annual rate of return. The actual rate of return may vary. Expected annual inflation rateFor planning purposes, PIN uses a 2% inflation rate. The actual inflation rate may vary. Distribution frequencyFor planning purposes, PIN uses an annual distribution to maximize the benefit from your donation. Increase distributions annuallyThese selections allow you to adjust your distributions for inflation. For planning purposes, PIN uses 'No adjustment for inflation' and the distribution to PIN will remain at a constant amount. ";KJE.ReportText=' Initial donation to the PIN Endowment Fund | CONTRIB_STARTING_BALANCE |
Periodic payments to PIN | WITHDRAW_AMOUNT WITHDRAW_FREQUENCY MSG_WITHDRAW_ADJUST_FOR_INFLATION |
Payment period | WITHDRAW_YEARS_TXT |
Annual return | WITHDRAW_ANNUAL_ROR |
**REPEATING GROUP** ';