function Calculate() {
// Initialize Variables
var boolErrorCheck = "TRUE";
var tierType = getTierType();
var ageFactor = 0.0;
var formAge = document.RetBenCalc.Age.value;
var formService = document.RetBenCalc.Service.value;
var formFinAvgMoComp = document.RetBenCalc.FinAvgMoComp.value;
// Check for empty input fields. Alert if found.
boolErrorCheck = isEmpty(formAge);
if(boolErrorCheck)
alert("Empty Field: Age at Retirement");
boolErrorCheck = isEmpty(formService);
if(boolErrorCheck)
alert("Empty Field: Years of Service");
boolErrorCheck = isEmpty(formFinAvgMoComp);
if(boolErrorCheck)
alert("Empty Field: Final Average Compensation");
// If no errors were found, process input data.
if(!boolErrorCheck) {
// Determine which Tier to calculate with.
switch( tierType ) {
case "GeneralEmployee": ageFactor = getGeneralFactor();
break;
case "SafetyEmployee": ageFactor = getGeneralFactor();
break;
default : alert("No Tier Type Selected!"); // Added for security, but not required (using the CHECKED command in the radio button to force an initial selection)
break;
}
// Calculate the Monthly Retirement Allowance and
// insert that value into the form.
var EstimatedBenefit;
EstimatedBenefit = 0;
if (ageFactor == getGeneralFactor()){
EstimatedBenefit = formFinAvgMoComp* 0.016667 * formService * ageFactor;
} else {
EstimatedBenefit = formFinAvgMoComp* 0.03 * formService * ageFactor;
}
// if (EstimatedBenefit > parseFloat(formFinAvgMoComp))
// {
// document.RetBenCalc.MoRetAllow.value = formFinAvgMoComp;
// alert (" Your monthly allowance would be " + "$" + (document.RetBenCalc.FinAvgMoComp.value) +
// " because the maximum monthly allowance you can receive is 100% of your Average Monthly Compensation." )
// }
// else
// {
document.RetBenCalc.MoRetAllow.value = format(EstimatedBenefit,2);
}
}
//}
function format(num,decimal) {
var count = decimal;
var MoRetAllow = "";
if(decimal) { MoRetAllow = "."; }
while(count--) { num = num*10; }
num = Math.round(num) + "";
var len = num.length;
count = decimal;
while(count--) { MoRetAllow = MoRetAllow + num.charAt(len-count-1); }
for(var x=len-decimal-1,count=0;x>=0;x--) {
MoRetAllow = num.charAt(x) + MoRetAllow;
if(!(++count%3) && x > 0) { MoRetAllow = "," + MoRetAllow; } // add commas
}
return(MoRetAllow);
}
// Determines and returns a Tier2 Age Factor to the calling function.
function getGeneralFactor() {
var GeneralAge = new Array (262)
GeneralAge[0]="50";
GeneralAge[1]="50.00";
GeneralAge[2]="50.0";
GeneralAge[3]="50.25";
GeneralAge[4]="50.50";
GeneralAge[5]="50.5";
GeneralAge[6]="50.75";
GeneralAge[7]="51";
GeneralAge[8]="51.00";
GeneralAge[9]="51.0";
GeneralAge[10]="51.25";
GeneralAge[11]="51.50";
GeneralAge[12]="51.5";
GeneralAge[13]="51.75";
GeneralAge[14]="52";
GeneralAge[15]="52.00";
GeneralAge[16]="52.0";
GeneralAge[17]="52.25";
GeneralAge[18]="52.50";
GeneralAge[19]="52.5";
GeneralAge[20]="52.75";
GeneralAge[21]="53";
GeneralAge[22]="53.00";
GeneralAge[23]="53.0";
GeneralAge[24]="53.25";
GeneralAge[25]="53.50";
GeneralAge[26]="53.5";
GeneralAge[27]="53.75";
GeneralAge[28]="54";
GeneralAge[29]="54.00";
GeneralAge[30]="54.0";
GeneralAge[31]="54.25";
GeneralAge[32]="54.50";
GeneralAge[33]="54.5";
GeneralAge[34]="54.75";
GeneralAge[35]="55";
GeneralAge[36]="55.00";
GeneralAge[37]="55.0";
GeneralAge[38]="55.25";
GeneralAge[39]="55.50";
GeneralAge[40]="55.5";
GeneralAge[41]="55.75";
GeneralAge[42]="56";
GeneralAge[43]="56.00";
GeneralAge[44]="56.0";
GeneralAge[45]="56.25";
GeneralAge[46]="56.50";
GeneralAge[47]="56.5";
GeneralAge[48]="56.75";
GeneralAge[49]="57";
GeneralAge[50]="57.00";
GeneralAge[51]="57.0";
GeneralAge[52]="57.25";
GeneralAge[53]="57.50";
GeneralAge[54]="57.5";
GeneralAge[55]="57.75";
GeneralAge[56]="58";
GeneralAge[57]="58.00";
GeneralAge[58]="58.0";
GeneralAge[59]="58.25";
GeneralAge[60]="58.50";
GeneralAge[61]="58.5";
GeneralAge[62]="58.75";
GeneralAge[63]="59";
GeneralAge[64]="59.00";
GeneralAge[65]="59.0";
GeneralAge[66]="59.25";
GeneralAge[67]="59.50";
GeneralAge[68]="59.5";
GeneralAge[69]="59.75";
GeneralAge[70]="60";
GeneralAge[71]="60.00";
GeneralAge[72]="60.0";
GeneralAge[73]="60.25";
GeneralAge[74]="60.50";
GeneralAge[75]="60.5";
GeneralAge[76]="60.75";
GeneralAge[77]="61";
GeneralAge[78]="61.00";
GeneralAge[79]="61.0";
GeneralAge[80]="61.25";
GeneralAge[81]="61.50";
GeneralAge[82]="61.5";
GeneralAge[83]="61.75";
GeneralAge[84]="62";
GeneralAge[85]="62.00";
GeneralAge[86]="62.0";
GeneralAge[87]="62.25";
GeneralAge[88]="62.50";
GeneralAge[89]="62.5";
GeneralAge[90]="62.75";
GeneralAge[91]="63";
GeneralAge[92]="63.00";
GeneralAge[93]="63.0";
GeneralAge[94]="63.25";
GeneralAge[95]="63.50";
GeneralAge[96]="63.5";
GeneralAge[97]="63.75";
GeneralAge[98]="64";
GeneralAge[99]="64.00";
GeneralAge[100]="64.0";
GeneralAge[101]="64.25";
GeneralAge[102]="64.50";
GeneralAge[103]="64.5";
GeneralAge[104]="64.75";
GeneralAge[105]="65";
GeneralAge[106]="65.00";
GeneralAge[107]="65.0";
GeneralAge[108]="65.25";
GeneralAge[109]="65.50";
GeneralAge[110]="65.5";
GeneralAge[111]="65.75";
GeneralAge[112]="66";
GeneralAge[113]="66.00";
GeneralAge[114]="66.0";
GeneralAge[115]="66.25";
GeneralAge[116]="66.50";
GeneralAge[117]="66.5";
GeneralAge[118]="66.75";
GeneralAge[119]="67";
GeneralAge[120]="67.00";
GeneralAge[121]="67.0";
GeneralAge[122]="67.25";
GeneralAge[123]="67.50";
GeneralAge[124]="67.5";
GeneralAge[125]="67.75";
GeneralAge[126]="68";
GeneralAge[127]="68.00";
GeneralAge[128]="68.0";
GeneralAge[129]="68.25";
GeneralAge[130]="68.50";
GeneralAge[131]="68.5";
GeneralAge[132]="68.75";
GeneralAge[133]="69";
GeneralAge[134]="69.00";
GeneralAge[135]="69.0";
GeneralAge[136]="69.25";
GeneralAge[137]="69.50";
GeneralAge[138]="69.5";
GeneralAge[139]="69.75";
GeneralAge[140]="70";
GeneralAge[141]="70.00";
GeneralAge[142]="70.0";
GeneralAge[143]="70.25";
GeneralAge[144]="70.50";
GeneralAge[145]="70.5";
GeneralAge[146]="70.75";
GeneralAge[147]="71";
GeneralAge[148]="71.00";
GeneralAge[149]="71.0";
GeneralAge[150]="71.25";
GeneralAge[151]="71.50";
GeneralAge[152]="71.5";
GeneralAge[153]="71.75";
GeneralAge[154]="72";
GeneralAge[155]="72.00";
GeneralAge[156]="72.0";
GeneralAge[157]="72.25";
GeneralAge[158]="72.50";
GeneralAge[159]="72.5";
GeneralAge[160]="72.75";
GeneralAge[161]="73";
GeneralAge[162]="73.00";
GeneralAge[163]="73.0";
GeneralAge[164]="73.25";
GeneralAge[165]="73.50";
GeneralAge[166]="73.5";
GeneralAge[167]="73.75";
GeneralAge[168]="74";
GeneralAge[169]="74.00";
GeneralAge[170]="74.0";
GeneralAge[171]="74.25";
GeneralAge[172]="74.50";
GeneralAge[173]="74.5";
GeneralAge[174]="74.75";
GeneralAge[175]="75";
GeneralAge[176]="75.00";
GeneralAge[177]="75.0";
GeneralAge[178]="75.25";
GeneralAge[179]="75.50";
GeneralAge[180]="75.5";
GeneralAge[181]="75.75";
GeneralAge[182]="76";
GeneralAge[183]="76.00";
GeneralAge[184]="76.0";
GeneralAge[185]="76.25";
GeneralAge[186]="76.50";
GeneralAge[187]="76.5";
GeneralAge[188]="76.75";
GeneralAge[189]="77";
GeneralAge[190]="77.00";
GeneralAge[191]="77.0";
GeneralAge[192]="77.25";
GeneralAge[193]="77.50";
GeneralAge[194]="77.5";
GeneralAge[195]="77.75";
GeneralAge[196]="78";
GeneralAge[197]="78.00";
GeneralAge[198]="78.0";
GeneralAge[199]="78.25";
GeneralAge[200]="78.50";
GeneralAge[201]="78.5";
GeneralAge[202]="78.75";
GeneralAge[203]="79";
GeneralAge[204]="79.00";
GeneralAge[205]="79.0";
GeneralAge[206]="79.25";
GeneralAge[207]="79.50";
GeneralAge[208]="79.5";
GeneralAge[209]="79.75";
GeneralAge[210]="80";
GeneralAge[211]="80.00";
GeneralAge[212]="80.0";
GeneralAge[213]="80.25";
GeneralAge[214]="80.50";
GeneralAge[215]="80.5";
GeneralAge[216]="80.75";
GeneralAge[217]="81";
GeneralAge[218]="81.00";
GeneralAge[219]="81.0";
GeneralAge[220]="81.25";
GeneralAge[221]="81.50";
GeneralAge[222]="81.5";
GeneralAge[223]="81.75";
GeneralAge[224]="82";
GeneralAge[225]="82.00";
GeneralAge[226]="82.0";
GeneralAge[227]="82.25";
GeneralAge[228]="82.50";
GeneralAge[229]="82.5";
GeneralAge[230]="82.75";
GeneralAge[231]="83";
GeneralAge[232]="83.00";
GeneralAge[233]="83.0";
GeneralAge[234]="83.25";
GeneralAge[235]="83.50";
GeneralAge[236]="83.5";
GeneralAge[237]="83.75";
GeneralAge[238]="84";
GeneralAge[239]="84.00";
GeneralAge[240]="84.0";
GeneralAge[241]="84.25";
GeneralAge[242]="84.50";
GeneralAge[243]="84.5";
GeneralAge[244]="84.75";
GeneralAge[245]="85";
GeneralAge[246]="85.00";
GeneralAge[247]="85.0";
GeneralAge[248]="85.25";
GeneralAge[249]="85.50";
GeneralAge[250]="85.5";
GeneralAge[251]="85.75";
GeneralAge[252]="86";
GeneralAge[253]="86.00";
GeneralAge[254]="86.0";
GeneralAge[255]="86.25";
GeneralAge[256]="86.50";
GeneralAge[257]="86.5";
GeneralAge[258]="86.75";
GeneralAge[259]="87";
GeneralAge[260]="87.00";
GeneralAge[261]="87.0";
var GeneralFactor = new Array(262);
GeneralFactor[0]=1.19997;
GeneralFactor[1]=1.19997;
GeneralFactor[2]=1.19997;
GeneralFactor[3]=1.21497;
GeneralFactor[4]=1.22997;
GeneralFactor[5]=1.22997;
GeneralFactor[6]=1.24497;
GeneralFactor[7]=1.25997;
GeneralFactor[8]=1.25997;
GeneralFactor[9]=1.25997;
GeneralFactor[10]=1.27497;
GeneralFactor[11]=1.28997;
GeneralFactor[12]=1.28997;
GeneralFactor[13]=1.30497;
GeneralFactor[14]=1.31997;
GeneralFactor[15]=1.31997;
GeneralFactor[16]=1.31997;
GeneralFactor[17]=1.33497;
GeneralFactor[18]=1.34997;
GeneralFactor[19]=1.34997;
GeneralFactor[20]=1.36497;
GeneralFactor[21]=1.37997;
GeneralFactor[22]=1.37997;
GeneralFactor[23]=1.37997;
GeneralFactor[24]=1.39497;
GeneralFactor[25]=1.40997;
GeneralFactor[26]=1.40997;
GeneralFactor[27]=1.42497;
GeneralFactor[28]=1.43997;
GeneralFactor[29]=1.43997;
GeneralFactor[30]=1.43997;
GeneralFactor[31]=1.45497;
GeneralFactor[32]=1.46997;
GeneralFactor[33]=1.46997;
GeneralFactor[34]=1.48497;
GeneralFactor[35]=1.49997;
GeneralFactor[36]=1.49997;
GeneralFactor[37]=1.49997;
GeneralFactor[38]=1.51497;
GeneralFactor[39]=1.52997;
GeneralFactor[40]=1.52997;
GeneralFactor[41]=1.54497;
GeneralFactor[42]=1.55997;
GeneralFactor[43]=1.55997;
GeneralFactor[44]=1.55997;
GeneralFactor[45]=1.57497;
GeneralFactor[46]=1.58997;
GeneralFactor[47]=1.58997;
GeneralFactor[48]=1.60497;
GeneralFactor[49]=1.61997;
GeneralFactor[50]=1.61997;
GeneralFactor[51]=1.61997;
GeneralFactor[52]=1.61997;
GeneralFactor[53]=1.61997;
GeneralFactor[54]=1.61997;
GeneralFactor[55]=1.61997;
GeneralFactor[56]=1.61997;
GeneralFactor[57]=1.61997;
GeneralFactor[58]=1.61997;
GeneralFactor[59]=1.61997;
GeneralFactor[60]=1.61997;
GeneralFactor[61]=1.61997;
GeneralFactor[62]=1.61997;
GeneralFactor[63]=1.61997;
GeneralFactor[64]=1.61997;
GeneralFactor[65]=1.61997;
GeneralFactor[66]=1.61997;
GeneralFactor[67]=1.61997;
GeneralFactor[68]=1.61997;
GeneralFactor[69]=1.61997;
GeneralFactor[70]=1.61997;
GeneralFactor[71]=1.61997;
GeneralFactor[72]=1.61997;
GeneralFactor[73]=1.61997;
GeneralFactor[74]=1.61997;
GeneralFactor[75]=1.61997;
GeneralFactor[76]=1.61997;
GeneralFactor[77]=1.61997;
GeneralFactor[78]=1.61997;
GeneralFactor[79]=1.61997;
GeneralFactor[80]=1.61997;
GeneralFactor[81]=1.61997;
GeneralFactor[82]=1.61997;
GeneralFactor[83]=1.61997;
GeneralFactor[84]=1.61997;
GeneralFactor[85]=1.61997;
GeneralFactor[86]=1.61997;
GeneralFactor[87]=1.61997;
GeneralFactor[88]=1.61997;
GeneralFactor[89]=1.61997;
GeneralFactor[90]=1.61997;
GeneralFactor[91]=1.61997;
GeneralFactor[92]=1.61997;
GeneralFactor[93]=1.61997;
GeneralFactor[94]=1.61997;
GeneralFactor[95]=1.61997;
GeneralFactor[96]=1.61997;
GeneralFactor[97]=1.61997;
GeneralFactor[98]=1.61997;
GeneralFactor[99]=1.61997;
GeneralFactor[100]=1.61997;
GeneralFactor[101]=1.61997;
GeneralFactor[102]=1.61997;
GeneralFactor[103]=1.61997;
GeneralFactor[104]=1.61997;
GeneralFactor[105]=1.61997;
GeneralFactor[106]=1.61997;
GeneralFactor[107]=1.61997;
GeneralFactor[108]=1.61997;
GeneralFactor[109]=1.61997;
GeneralFactor[110]=1.61997;
GeneralFactor[111]=1.61997;
GeneralFactor[112]=1.61997;
GeneralFactor[113]=1.61997;
GeneralFactor[114]=1.61997;
GeneralFactor[115]=1.61997;
GeneralFactor[116]=1.61997;
GeneralFactor[117]=1.61997;
GeneralFactor[118]=1.61997;
GeneralFactor[119]=1.61997;
GeneralFactor[120]=1.61997;
GeneralFactor[121]=1.61997;
GeneralFactor[122]=1.61997;
GeneralFactor[123]=1.61997;
GeneralFactor[124]=1.61997;
GeneralFactor[125]=1.61997;
GeneralFactor[126]=1.61997;
GeneralFactor[127]=1.61997;
GeneralFactor[128]=1.61997;
GeneralFactor[129]=1.61997;
GeneralFactor[130]=1.61997;
GeneralFactor[131]=1.61997;
GeneralFactor[132]=1.61997;
GeneralFactor[133]=1.61997;
GeneralFactor[134]=1.61997;
GeneralFactor[135]=1.61997;
GeneralFactor[136]=1.61997;
GeneralFactor[137]=1.61997;
GeneralFactor[138]=1.61997;
GeneralFactor[139]=1.61997;
GeneralFactor[140]=1.61997;
GeneralFactor[141]=1.61997;
GeneralFactor[142]=1.61997;
GeneralFactor[143]=1.61997;
GeneralFactor[144]=1.61997;
GeneralFactor[145]=1.61997;
GeneralFactor[146]=1.61997;
GeneralFactor[147]=1.61997;
GeneralFactor[148]=1.61997;
GeneralFactor[149]=1.61997;
GeneralFactor[150]=1.61997;
GeneralFactor[151]=1.61997;
GeneralFactor[152]=1.61997;
GeneralFactor[153]=1.61997;
GeneralFactor[154]=1.61997;
GeneralFactor[155]=1.61997;
GeneralFactor[156]=1.61997;
GeneralFactor[157]=1.61997;
GeneralFactor[158]=1.61997;
GeneralFactor[159]=1.61997;
GeneralFactor[160]=1.61997;
GeneralFactor[161]=1.61997;
GeneralFactor[162]=1.61997;
GeneralFactor[163]=1.61997;
GeneralFactor[164]=1.61997;
GeneralFactor[165]=1.61997;
GeneralFactor[166]=1.61997;
GeneralFactor[167]=1.61997;
GeneralFactor[168]=1.61997;
GeneralFactor[169]=1.61997;
GeneralFactor[170]=1.61997;
GeneralFactor[171]=1.61997;
GeneralFactor[172]=1.61997;
GeneralFactor[173]=1.61997;
GeneralFactor[174]=1.61997;
GeneralFactor[175]=1.61997;
GeneralFactor[176]=1.61997;
GeneralFactor[177]=1.61997;
GeneralFactor[178]=1.61997;
GeneralFactor[179]=1.61997;
GeneralFactor[180]=1.61997;
GeneralFactor[181]=1.61997;
GeneralFactor[182]=1.61997;
GeneralFactor[183]=1.61997;
GeneralFactor[184]=1.61997;
GeneralFactor[185]=1.61997;
GeneralFactor[186]=1.61997;
GeneralFactor[187]=1.61997;
GeneralFactor[188]=1.61997;
GeneralFactor[189]=1.61997;
GeneralFactor[190]=1.61997;
GeneralFactor[191]=1.61997;
GeneralFactor[192]=1.61997;
GeneralFactor[193]=1.61997;
GeneralFactor[194]=1.61997;
GeneralFactor[195]=1.61997;
GeneralFactor[196]=1.61997;
GeneralFactor[197]=1.61997;
GeneralFactor[198]=1.61997;
GeneralFactor[199]=1.61997;
GeneralFactor[200]=1.61997;
GeneralFactor[201]=1.61997;
GeneralFactor[202]=1.61997;
GeneralFactor[203]=1.61997;
GeneralFactor[204]=1.61997;
GeneralFactor[205]=1.61997;
GeneralFactor[206]=1.61997;
GeneralFactor[207]=1.61997;
GeneralFactor[208]=1.61997;
GeneralFactor[209]=1.61997;
GeneralFactor[210]=1.61997;
GeneralFactor[211]=1.61997;
GeneralFactor[212]=1.61997;
GeneralFactor[213]=1.61997;
GeneralFactor[214]=1.61997;
GeneralFactor[215]=1.61997;
GeneralFactor[216]=1.61997;
GeneralFactor[217]=1.61997;
GeneralFactor[218]=1.61997;
GeneralFactor[219]=1.61997;
GeneralFactor[220]=1.61997;
GeneralFactor[221]=1.61997;
GeneralFactor[222]=1.61997;
GeneralFactor[223]=1.61997;
GeneralFactor[224]=1.61997;
GeneralFactor[225]=1.61997;
GeneralFactor[226]=1.61997;
GeneralFactor[227]=1.61997;
GeneralFactor[228]=1.61997;
GeneralFactor[229]=1.61997;
GeneralFactor[230]=1.61997;
GeneralFactor[231]=1.61997;
GeneralFactor[232]=1.61997;
GeneralFactor[233]=1.61997;
GeneralFactor[234]=1.61997;
GeneralFactor[235]=1.61997;
GeneralFactor[236]=1.61997;
GeneralFactor[237]=1.61997;
GeneralFactor[238]=1.61997;
GeneralFactor[239]=1.61997;
GeneralFactor[240]=1.61997;
GeneralFactor[241]=1.61997;
GeneralFactor[242]=1.61997;
GeneralFactor[243]=1.61997;
GeneralFactor[244]=1.61997;
GeneralFactor[245]=1.61997;
GeneralFactor[246]=1.61997;
GeneralFactor[247]=1.61997;
GeneralFactor[248]=1.61997;
GeneralFactor[249]=1.61997;
GeneralFactor[250]=1.61997;
GeneralFactor[251]=1.61997;
GeneralFactor[252]=1.61997;
GeneralFactor[253]=1.61997;
GeneralFactor[254]=1.61997;
GeneralFactor[255]=1.61997;
GeneralFactor[256]=1.61997;
GeneralFactor[257]=1.61997;
GeneralFactor[258]=1.61997;
GeneralFactor[259]=1.61997;
GeneralFactor[260]=1.61997;
GeneralFactor[261]=1.61997;
var selectedAge = document.RetBenCalc.Age.value;
for (var i = 0; i < GeneralAge.length; i++) {
if (GeneralAge[i] == selectedAge) {
break;
}
}
return GeneralFactor[i];
}
// Determines and returns a Safety3 Age Factor to the calling function.
function getSafetyFactor() {
var SafetyAge = new Array (332);
SafetyAge[0]="38";
SafetyAge[1]="38.00";
SafetyAge[2]="38.0";
SafetyAge[3]="38.25";
SafetyAge[4]="38.50";
SafetyAge[5]="38.5";
SafetyAge[6]="38.75";
SafetyAge[7]="39";
SafetyAge[8]="39.00";
SafetyAge[9]="39.0";
SafetyAge[10]="39.25";
SafetyAge[11]="39.50";
SafetyAge[12]="39.5";
SafetyAge[13]="39.75";
SafetyAge[14]="40";
SafetyAge[15]="40.00";
SafetyAge[16]="40.0";
SafetyAge[17]="40.25";
SafetyAge[18]="40.50";
SafetyAge[19]="40.5";
SafetyAge[20]="40.75";
SafetyAge[21]="41";
SafetyAge[22]="41.00";
SafetyAge[23]="41.0";
SafetyAge[24]="41.25";
SafetyAge[25]="41.50";
SafetyAge[26]="41.5";
SafetyAge[27]="41.75";
SafetyAge[28]="42";
SafetyAge[29]="42.00";
SafetyAge[30]="42.0";
SafetyAge[31]="42.25";
SafetyAge[32]="42.50";
SafetyAge[33]="42.5";
SafetyAge[34]="42.75";
SafetyAge[35]="43";
SafetyAge[36]="43.00";
SafetyAge[37]="43.0";
SafetyAge[38]="43.25";
SafetyAge[39]="43.50";
SafetyAge[40]="43.5";
SafetyAge[41]="43.75";
SafetyAge[42]="44";
SafetyAge[43]="44.00";
SafetyAge[44]="44.0";
SafetyAge[45]="44.25";
SafetyAge[46]="44.50";
SafetyAge[47]="44.5";
SafetyAge[48]="44.75";
SafetyAge[49]="45";
SafetyAge[50]="45.00";
SafetyAge[51]="45.0";
SafetyAge[52]="45.25";
SafetyAge[53]="45.50";
SafetyAge[54]="45.5";
SafetyAge[55]="45.75";
SafetyAge[56]="46";
SafetyAge[57]="46.00";
SafetyAge[58]="46.0";
SafetyAge[59]="46.25";
SafetyAge[60]="46.50";
SafetyAge[61]="46.5";
SafetyAge[62]="46.75";
SafetyAge[63]="47";
SafetyAge[64]="47.00";
SafetyAge[65]="47.0";
SafetyAge[66]="47.25";
SafetyAge[67]="47.50";
SafetyAge[68]="47.5";
SafetyAge[69]="47.75";
SafetyAge[70]="48";
SafetyAge[71]="48.00";
SafetyAge[72]="48.0";
SafetyAge[73]="48.25";
SafetyAge[74]="48.50";
SafetyAge[75]="48.5";
SafetyAge[76]="48.75";
SafetyAge[77]="49";
SafetyAge[78]="49.00";
SafetyAge[79]="49.0";
SafetyAge[80]="49.25";
SafetyAge[81]="49.50";
SafetyAge[82]="49.5";
SafetyAge[83]="49.75";
SafetyAge[84]="52";
SafetyAge[85]="52.00";
SafetyAge[86]="52.0";
SafetyAge[87]="52.25";
SafetyAge[88]="52.50";
SafetyAge[89]="52.5";
SafetyAge[90]="52.75";
SafetyAge[91]="53";
SafetyAge[92]="53.00";
SafetyAge[93]="53.0";
SafetyAge[94]="53.25";
SafetyAge[95]="53.50";
SafetyAge[96]="53.5";
SafetyAge[97]="53.75";
SafetyAge[98]="52";
SafetyAge[99]="52.00";
SafetyAge[100]="52.0";
SafetyAge[101]="52.25";
SafetyAge[102]="52.50";
SafetyAge[103]="52.5";
SafetyAge[104]="52.75";
SafetyAge[105]="53";
SafetyAge[106]="53.00";
SafetyAge[107]="53.0";
SafetyAge[108]="53.25";
SafetyAge[109]="53.50";
SafetyAge[110]="53.5";
SafetyAge[111]="53.75";
SafetyAge[112]="54";
SafetyAge[113]="54.00";
SafetyAge[114]="54.0";
SafetyAge[115]="54.25";
SafetyAge[116]="54.50";
SafetyAge[117]="54.5";
SafetyAge[118]="54.75";
SafetyAge[119]="55";
SafetyAge[120]="55.00";
SafetyAge[121]="55.0";
SafetyAge[122]="55.25";
SafetyAge[123]="55.50";
SafetyAge[124]="55.5";
SafetyAge[125]="55.75";
SafetyAge[126]="56";
SafetyAge[127]="56.00";
SafetyAge[128]="56.0";
SafetyAge[129]="56.25";
SafetyAge[130]="56.50";
SafetyAge[131]="56.5";
SafetyAge[132]="56.75";
SafetyAge[133]="57";
SafetyAge[134]="57.00";
SafetyAge[135]="57.0";
SafetyAge[136]="57.25";
SafetyAge[137]="57.50";
SafetyAge[138]="57.5";
SafetyAge[139]="57.75";
SafetyAge[140]="58";
SafetyAge[141]="58.00";
SafetyAge[142]="58.0";
SafetyAge[143]="58.25";
SafetyAge[144]="58.50";
SafetyAge[145]="58.5";
SafetyAge[146]="58.75";
SafetyAge[147]="59";
SafetyAge[148]="59.00";
SafetyAge[149]="59.0";
SafetyAge[150]="59.25";
SafetyAge[151]="59.50";
SafetyAge[152]="59.5";
SafetyAge[153]="59.75";
SafetyAge[154]="60";
SafetyAge[155]="60.00";
SafetyAge[156]="60.0";
SafetyAge[157]="60.25";
SafetyAge[158]="60.50";
SafetyAge[159]="60.5";
SafetyAge[160]="60.75";
SafetyAge[161]="61";
SafetyAge[162]="61.00";
SafetyAge[163]="61.0";
SafetyAge[164]="61.25";
SafetyAge[165]="61.50";
SafetyAge[166]="61.5";
SafetyAge[167]="61.75";
SafetyAge[168]="62";
SafetyAge[169]="62.00";
SafetyAge[170]="62.0";
SafetyAge[171]="62.25";
SafetyAge[172]="62.50";
SafetyAge[173]="62.5";
SafetyAge[174]="62.75";
SafetyAge[175]="63";
SafetyAge[176]="63.00";
SafetyAge[177]="63.0";
SafetyAge[178]="63.25";
SafetyAge[179]="63.50";
SafetyAge[180]="63.5";
SafetyAge[181]="63.75";
SafetyAge[182]="64";
SafetyAge[183]="64.00";
SafetyAge[184]="64.0";
SafetyAge[185]="64.25";
SafetyAge[186]="64.50";
SafetyAge[187]="64.5";
SafetyAge[188]="64.75";
SafetyAge[189]="65";
SafetyAge[190]="65.00";
SafetyAge[191]="65.0";
SafetyAge[192]="65.25";
SafetyAge[193]="65.50";
SafetyAge[194]="65.5";
SafetyAge[195]="65.75";
SafetyAge[196]="66";
SafetyAge[197]="66.00";
SafetyAge[198]="66.0";
SafetyAge[199]="66.25";
SafetyAge[200]="66.50";
SafetyAge[201]="66.5";
SafetyAge[202]="66.75";
SafetyAge[203]="67";
SafetyAge[204]="67.00";
SafetyAge[205]="67.0";
SafetyAge[206]="67.25";
SafetyAge[207]="67.50";
SafetyAge[208]="67.5";
SafetyAge[209]="67.75";
SafetyAge[210]="68";
SafetyAge[211]="68.00";
SafetyAge[212]="68.0";
SafetyAge[213]="68.25";
SafetyAge[214]="68.50";
SafetyAge[215]="68.5";
SafetyAge[216]="68.75";
SafetyAge[217]="69";
SafetyAge[218]="69.00";
SafetyAge[219]="69.0";
SafetyAge[220]="69.25";
SafetyAge[221]="69.50";
SafetyAge[222]="69.5";
SafetyAge[223]="69.75";
SafetyAge[224]="70";
SafetyAge[225]="70.00";
SafetyAge[226]="70.0";
SafetyAge[227]="70.25";
SafetyAge[228]="70.50";
SafetyAge[229]="70.5";
SafetyAge[230]="70.75";
SafetyAge[231]="71";
SafetyAge[232]="71.00";
SafetyAge[233]="71.0";
SafetyAge[234]="71.25";
SafetyAge[235]="71.50";
SafetyAge[236]="71.5";
SafetyAge[237]="71.75";
SafetyAge[238]="72";
SafetyAge[239]="72.00";
SafetyAge[240]="72.0";
SafetyAge[241]="72.25";
SafetyAge[242]="72.50";
SafetyAge[243]="72.5";
SafetyAge[244]="72.75";
SafetyAge[245]="73";
SafetyAge[246]="73.00";
SafetyAge[247]="73.0";
SafetyAge[248]="73.25";
SafetyAge[249]="73.50";
SafetyAge[250]="73.5";
SafetyAge[251]="73.75";
SafetyAge[252]="74";
SafetyAge[253]="74.00";
SafetyAge[254]="74.0";
SafetyAge[255]="74.25";
SafetyAge[256]="74.50";
SafetyAge[257]="74.5";
SafetyAge[258]="74.75";
SafetyAge[259]="75";
SafetyAge[260]="75.00";
SafetyAge[261]="75.0";
SafetyAge[262]="75.25";
SafetyAge[263]="75.50";
SafetyAge[264]="75.5";
SafetyAge[265]="75.75";
SafetyAge[266]="76";
SafetyAge[267]="76.00";
SafetyAge[268]="76.0";
SafetyAge[269]="76.25";
SafetyAge[270]="76.50";
SafetyAge[271]="76.5";
SafetyAge[272]="76.75";
SafetyAge[273]="77";
SafetyAge[274]="77.00";
SafetyAge[275]="77.0";
SafetyAge[276]="77.25";
SafetyAge[277]="77.50";
SafetyAge[278]="77.5";
SafetyAge[279]="77.75";
SafetyAge[280]="78";
SafetyAge[281]="78.00";
SafetyAge[282]="78.0";
SafetyAge[283]="78.25";
SafetyAge[284]="78.50";
SafetyAge[285]="78.5";
SafetyAge[286]="78.75";
SafetyAge[287]="79";
SafetyAge[288]="79.00";
SafetyAge[289]="79.0";
SafetyAge[290]="79.25";
SafetyAge[291]="79.50";
SafetyAge[292]="79.5";
SafetyAge[293]="79.75";
SafetyAge[294]="80";
SafetyAge[295]="80.00";
SafetyAge[296]="80.0";
SafetyAge[297]="80.25";
SafetyAge[298]="80.50";
SafetyAge[299]="80.5";
SafetyAge[300]="80.75";
SafetyAge[301]="81";
SafetyAge[302]="81.00";
SafetyAge[303]="81.0";
SafetyAge[304]="81.25";
SafetyAge[305]="81.50";
SafetyAge[306]="81.5";
SafetyAge[307]="81.75";
SafetyAge[308]="82";
SafetyAge[309]="82.00";
SafetyAge[310]="82.0";
SafetyAge[311]="82.25";
SafetyAge[312]="82.50";
SafetyAge[313]="82.5";
SafetyAge[314]="82.75";
SafetyAge[315]="83";
SafetyAge[316]="83.00";
SafetyAge[317]="83.0";
SafetyAge[318]="83.25";
SafetyAge[319]="83.50";
SafetyAge[320]="83.5";
SafetyAge[321]="83.75";
SafetyAge[322]="84";
SafetyAge[323]="84.00";
SafetyAge[324]="84.0";
SafetyAge[325]="84.25";
SafetyAge[326]="84.50";
SafetyAge[327]="84.5";
SafetyAge[328]="84.75";
SafetyAge[329]="85";
SafetyAge[330]="85.00";
SafetyAge[331]="85.0";
var SafetyFactor = new Array(332);
SafetyFactor[0]=0.6258000001;
SafetyFactor[1]=0.6258000001;
SafetyFactor[2]=0.6258000001;
SafetyFactor[3]=0.6258000001;
SafetyFactor[4]=0.6258000001;
SafetyFactor[5]=0.6258000001;
SafetyFactor[6]=0.6258000001;
SafetyFactor[7]=0.6258000001;
SafetyFactor[8]=0.6258000001;
SafetyFactor[9]=0.6258000001;
SafetyFactor[10]=0.6258000001;
SafetyFactor[11]=0.6258000001;
SafetyFactor[12]=0.6258000001;
SafetyFactor[13]=0.6258000001;
SafetyFactor[14]=0.6258000001;
SafetyFactor[15]=0.6258000001;
SafetyFactor[16]=0.6258000001;
SafetyFactor[17]=0.6258000001;
SafetyFactor[18]=0.6258000001;
SafetyFactor[19]=0.6258000001;
SafetyFactor[20]=0.6258000001;
SafetyFactor[21]=0.6258000001;
SafetyFactor[22]=0.6258000001;
SafetyFactor[23]=0.6258000001;
SafetyFactor[24]=0.6350000001;
SafetyFactor[25]=0.6442000001;
SafetyFactor[26]=0.6442000001;
SafetyFactor[27]=0.6533000001;
SafetyFactor[28]=0.6625000001;
SafetyFactor[29]=0.6625000001;
SafetyFactor[30]=0.6625000001;
SafetyFactor[31]=0.6720000001;
SafetyFactor[32]=0.6814000001;
SafetyFactor[33]=0.6814000001;
SafetyFactor[34]=0.6909000001;
SafetyFactor[35]=0.7004000001;
SafetyFactor[36]=0.7004000001;
SafetyFactor[37]=0.7004000001;
SafetyFactor[38]=0.7102000001;
SafetyFactor[39]=0.7200000001;
SafetyFactor[40]=0.7200000001;
SafetyFactor[41]=0.7299000001;
SafetyFactor[42]=0.7397000001;
SafetyFactor[43]=0.7397000001;
SafetyFactor[44]=0.7397000001;
SafetyFactor[45]=0.7499000001;
SafetyFactor[46]=0.7601000001;
SafetyFactor[47]=0.7601000001;
SafetyFactor[48]=0.7703000001;
SafetyFactor[49]=0.7805000001;
SafetyFactor[50]=0.7805000001;
SafetyFactor[51]=0.7805000001;
SafetyFactor[52]=0.7910000001;
SafetyFactor[53]=0.8016000001;
SafetyFactor[54]=0.8016000001;
SafetyFactor[55]=0.8021000001;
SafetyFactor[56]=0.8226000001;
SafetyFactor[57]=0.8226000001;
SafetyFactor[58]=0.8226000001;
SafetyFactor[59]=0.8339000001;
SafetyFactor[60]=0.8452000001;
SafetyFactor[61]=0.8452000001;
SafetyFactor[62]=0.8565000001;
SafetyFactor[63]=0.8678000001;
SafetyFactor[64]=0.8678000001;
SafetyFactor[65]=0.8678000001;
SafetyFactor[66]=0.8780000001;
SafetyFactor[67]=0.8882000001;
SafetyFactor[68]=0.8882000001;
SafetyFactor[69]=0.8983000001;
SafetyFactor[70]=0.9085000001;
SafetyFactor[71]=0.9085000001;
SafetyFactor[72]=0.9085000001;
SafetyFactor[73]=0.9194000001;
SafetyFactor[74]=0.9304000001;
SafetyFactor[75]=0.9304000001;
SafetyFactor[76]=0.94130000001;
SafetyFactor[77]=0.9522000001;
SafetyFactor[78]=0.9522000001;
SafetyFactor[79]=0.9522000001;
SafetyFactor[80]=0.9641000001;
SafetyFactor[81]=0.9761000001;
SafetyFactor[82]=0.9761000001;
SafetyFactor[83]=0.9880000001;
SafetyFactor[84]=1.0000000001;
SafetyFactor[85]=1.0000000001;
SafetyFactor[86]=1.0000000001;
SafetyFactor[87]=1.0000000001;
SafetyFactor[88]=1.0000000001;
SafetyFactor[89]=1.0000000001;
SafetyFactor[90]=1.0000000001;
SafetyFactor[91]=1.0000000001;
SafetyFactor[92]=1.0000000001;
SafetyFactor[93]=1.0000000001;
SafetyFactor[94]=1.0000000001;
SafetyFactor[95]=1.0000000001;
SafetyFactor[96]=1.0000000001;
SafetyFactor[97]=1.0000000001;
SafetyFactor[98]=1.0000000001;
SafetyFactor[99]=1.0000000001;
SafetyFactor[100]=1.0000000001;
SafetyFactor[101]=1.0000000001;
SafetyFactor[102]=1.0000000001;
SafetyFactor[103]=1.0000000001;
SafetyFactor[104]=1.0000000001;
SafetyFactor[105]=1.0000000001;
SafetyFactor[106]=1.0000000001;
SafetyFactor[107]=1.0000000001;
SafetyFactor[108]=1.0000000001;
SafetyFactor[109]=1.0000000001;
SafetyFactor[110]=1.0000000001;
SafetyFactor[111]=1.0000000001;
SafetyFactor[112]=1.0000000001;
SafetyFactor[113]=1.0000000001;
SafetyFactor[114]=1.0000000001;
SafetyFactor[115]=1.0000000001;
SafetyFactor[116]=1.0000000001;
SafetyFactor[117]=1.0000000001;
SafetyFactor[118]=1.0000000001;
SafetyFactor[119]=1.0000000001;
SafetyFactor[120]=1.0000000001;
SafetyFactor[121]=1.0000000001;
SafetyFactor[122]=1.0000000001;
SafetyFactor[123]=1.0000000001;
SafetyFactor[124]=1.0000000001;
SafetyFactor[125]=1.0000000001;
SafetyFactor[126]=1.0000000001;
SafetyFactor[127]=1.0000000001;
SafetyFactor[128]=1.0000000001;
SafetyFactor[129]=1.0000000001;
SafetyFactor[130]=1.0000000001;
SafetyFactor[131]=1.0000000001;
SafetyFactor[132]=1.0000000001;
SafetyFactor[133]=1.0000000001;
SafetyFactor[134]=1.0000000001;
SafetyFactor[135]=1.0000000001;
SafetyFactor[136]=1.0000000001;
SafetyFactor[137]=1.0000000001;
SafetyFactor[138]=1.0000000001;
SafetyFactor[139]=1.0000000001;
SafetyFactor[140]=1.0000000001;
SafetyFactor[141]=1.0000000001;
SafetyFactor[142]=1.0000000001;
SafetyFactor[143]=1.0000000001;
SafetyFactor[144]=1.0000000001;
SafetyFactor[145]=1.0000000001;
SafetyFactor[146]=1.0000000001;
SafetyFactor[147]=1.0000000001;
SafetyFactor[148]=1.0000000001;
SafetyFactor[149]=1.0000000001;
SafetyFactor[150]=1.0000000001;
SafetyFactor[151]=1.0000000001;
SafetyFactor[152]=1.0000000001;
SafetyFactor[153]=1.0000000001;
SafetyFactor[154]=1.0000000001;
SafetyFactor[155]=1.0000000001;
SafetyFactor[156]=1.0000000001;
SafetyFactor[157]=1.0000000001;
SafetyFactor[158]=1.0000000001;
SafetyFactor[159]=1.0000000001;
SafetyFactor[160]=1.0000000001;
SafetyFactor[161]=1.0000000001;
SafetyFactor[162]=1.0000000001;
SafetyFactor[163]=1.0000000001;
SafetyFactor[164]=1.0000000010;
SafetyFactor[165]=1.0000000001;
SafetyFactor[166]=1.0000000001;
SafetyFactor[167]=1.0000000001;
SafetyFactor[168]=1.0000000001;
SafetyFactor[169]=1.0000000001;
SafetyFactor[170]=1.0000000001;
SafetyFactor[171]=1.0000000001;
SafetyFactor[172]=1.0000000001;
SafetyFactor[173]=1.0000000001;
SafetyFactor[174]=1.0000000001;
SafetyFactor[175]=1.0000000001;
SafetyFactor[176]=1.0000000001;
SafetyFactor[177]=1.0000000001;
SafetyFactor[178]=1.0000000001;
SafetyFactor[179]=1.0000000001;
SafetyFactor[180]=1.0000000001;
SafetyFactor[181]=1.0000000001;
SafetyFactor[182]=1.0000000001;
SafetyFactor[183]=1.0000000001;
SafetyFactor[184]=1.0000000001;
SafetyFactor[185]=1.0000000001;
SafetyFactor[186]=1.0000000001;
SafetyFactor[187]=1.0000000001;
SafetyFactor[188]=1.0000000001;
SafetyFactor[189]=1.0000000001;
SafetyFactor[190]=1.0000000001;
SafetyFactor[191]=1.0000000001;
SafetyFactor[192]=1.0000000001;
SafetyFactor[193]=1.0000000001;
SafetyFactor[194]=1.0000000001;
SafetyFactor[195]=1.0000000001;
SafetyFactor[196]=1.0000000001;
SafetyFactor[197]=1.0000000001;
SafetyFactor[198]=1.0000000001;
SafetyFactor[199]=1.0000000001;
SafetyFactor[200]=1.0000000001;
SafetyFactor[201]=1.0000000001;
SafetyFactor[202]=1.0000000001;
SafetyFactor[203]=1.0000000001;
SafetyFactor[204]=1.0000000001;
SafetyFactor[205]=1.0000000001;
SafetyFactor[206]=1.0000000001;
SafetyFactor[207]=1.0000000001;
SafetyFactor[208]=1.0000000001;
SafetyFactor[209]=1.0000000001;
SafetyFactor[210]=1.0000000001;
SafetyFactor[211]=1.0000000001;
SafetyFactor[212]=1.0000000001;
SafetyFactor[213]=1.0000000001;
SafetyFactor[214]=1.0000000001;
SafetyFactor[215]=1.0000000001;
SafetyFactor[216]=1.0000000001;
SafetyFactor[217]=1.0000000001;
SafetyFactor[218]=1.0000000001;
SafetyFactor[219]=1.0000000001;
SafetyFactor[220]=1.0000000001;
SafetyFactor[221]=1.0000000001;
SafetyFactor[222]=1.0000000001;
SafetyFactor[223]=1.0000000001;
SafetyFactor[224]=1.0000000001;
SafetyFactor[225]=1.0000000001;
SafetyFactor[226]=1.0000000001;
SafetyFactor[227]=1.0000000001;
SafetyFactor[228]=1.0000000001;
SafetyFactor[229]=1.0000000001;
SafetyFactor[230]=1.0000000001;
SafetyFactor[231]=1.0000000001;
SafetyFactor[232]=1.0000000001;
SafetyFactor[233]=1.0000000001;
SafetyFactor[234]=1.0000000001;
SafetyFactor[235]=1.0000000001;
SafetyFactor[236]=1.0000000001;
SafetyFactor[237]=1.0000000001;
SafetyFactor[238]=1.0000000001;
SafetyFactor[239]=1.0000000001;
SafetyFactor[240]=1.0000000001;
SafetyFactor[241]=1.0000000001;
SafetyFactor[242]=1.0000000001;
SafetyFactor[243]=1.0000000001;
SafetyFactor[244]=1.0000000001;
SafetyFactor[245]=1.0000000001;
SafetyFactor[246]=1.0000000001;
SafetyFactor[247]=1.0000000001;
SafetyFactor[248]=1.0000000001;
SafetyFactor[249]=1.0000000001;
SafetyFactor[250]=1.0000000001;
SafetyFactor[251]=1.0000000001;
SafetyFactor[252]=1.0000000001;
SafetyFactor[253]=1.0000000001;
SafetyFactor[254]=1.0000000001;
SafetyFactor[255]=1.0000000001;
SafetyFactor[256]=1.0000000001;
SafetyFactor[257]=1.0000000001;
SafetyFactor[258]=1.0000000001;
SafetyFactor[259]=1.0000000001;
SafetyFactor[260]=1.0000000001;
SafetyFactor[261]=1.0000000001;
SafetyFactor[262]=1.0000000001;
SafetyFactor[263]=1.0000000001;
SafetyFactor[264]=1.0000000010;
SafetyFactor[265]=1.0000000001;
SafetyFactor[266]=1.0000000001;
SafetyFactor[267]=1.0000000001;
SafetyFactor[268]=1.0000000001;
SafetyFactor[269]=1.0000000001;
SafetyFactor[270]=1.0000000001;
SafetyFactor[271]=1.0000000001;
SafetyFactor[272]=1.0000000001;
SafetyFactor[273]=1.0000000001;
SafetyFactor[274]=1.0000000001;
SafetyFactor[275]=1.0000000001;
SafetyFactor[276]=1.0000000001;
SafetyFactor[277]=1.0000000001;
SafetyFactor[278]=1.0000000001;
SafetyFactor[279]=1.0000000001;
SafetyFactor[280]=1.0000000001;
SafetyFactor[281]=1.0000000001;
SafetyFactor[282]=1.0000000001;
SafetyFactor[283]=1.0000000001;
SafetyFactor[284]=1.0000000001;
SafetyFactor[285]=1.0000000001;
SafetyFactor[286]=1.0000000001;
SafetyFactor[287]=1.0000000001;
SafetyFactor[288]=1.0000000001;
SafetyFactor[289]=1.0000000001;
SafetyFactor[290]=1.0000000001;
SafetyFactor[291]=1.0000000001;
SafetyFactor[292]=1.0000000001;
SafetyFactor[293]=1.0000000001;
SafetyFactor[294]=1.0000000001;
SafetyFactor[295]=1.0000000001;
SafetyFactor[296]=1.0000000001;
SafetyFactor[297]=1.0000000001;
SafetyFactor[298]=1.0000000001;
SafetyFactor[299]=1.0000000001;
SafetyFactor[300]=1.0000000001;
SafetyFactor[301]=1.0000000001;
SafetyFactor[302]=1.0000000001;
SafetyFactor[303]=1.0000000001;
SafetyFactor[304]=1.0000000001;
SafetyFactor[305]=1.0000000001;
SafetyFactor[306]=1.0000000001;
SafetyFactor[307]=1.0000000001;
SafetyFactor[308]=1.0000000001;
SafetyFactor[309]=1.0000000001;
SafetyFactor[310]=1.0000000001;
SafetyFactor[311]=1.0000000001;
SafetyFactor[312]=1.0000000001;
SafetyFactor[313]=1.0000000001;
SafetyFactor[314]=1.0000000001;
SafetyFactor[315]=1.0000000001;
SafetyFactor[316]=1.0000000001;
SafetyFactor[317]=1.0000000001;
SafetyFactor[318]=1.0000000001;
SafetyFactor[319]=1.0000000001;
SafetyFactor[320]=1.0000000001;
SafetyFactor[321]=1.0000000001;
SafetyFactor[322]=1.0000000001;
SafetyFactor[323]=1.0000000001;
SafetyFactor[324]=1.0000000001;
SafetyFactor[325]=1.0000000001;
SafetyFactor[326]=1.0000000001;
SafetyFactor[327]=1.0000000001;
SafetyFactor[328]=1.0000000001;
SafetyFactor[329]=1.0000000001;
SafetyFactor[330]=1.0000000001;
SafetyFactor[331]=1.0000000001;
var selectedAge = document.RetBenCalc.Age.value;
for (var i = 0; i < SafetyAge.length; i++) {
if (SafetyAge[i] == selectedAge) {
break;
}
}
return SafetyFactor[i];
}
// Deterimes the Tier Type from the selected Radio button and returns
// it to the calling function.
function getTierType() {
var selectedtype = document.RetBenCalc;
// for (var i = 0; i < selectedtype.tiers.length; i++) {
// if (selectedtype.tiers[i].checked) {
// break
// }
// }
return selectedtype.tiers.value;
}
//Validates that field is not empty.
function isEmpty(inputStr) {
if (inputStr == "" || inputStr == null) {
return true;
}
return false;
}
//Validates that number is in specified range.
function inRange(inputStr, lo, hi) {
var num =parseInt(inputStr, 10);
if (num hi) {
return false;
}
return true;
}
// Validates age field.
function incAgeEntry(Age){
var input = parseInt(document.RetBenCalc.Age.value, 10);
if (isNaN(input)){
alert("Please enter numbers only into this box.");
return false;
} else {
if (document.RetBenCalc.Age.value.length > 6) {
alert("Please enter a number that is no larger than 6 digits.");
return false;
} else {
if (!inRange(input,50,85)) {
alert("Employee does not meet years/service required for retirement");
return false;
}
return true;
}
}
}
//Validates Years of Service field.
function incServiceEntry(Service){
var input = parseInt(document.RetBenCalc.Service.value, 10);
if (isNaN(input)){
alert("Please enter numbers only into this box.");
return false;
} else {
if (document.RetBenCalc.Service.value.length >5) {
alert("Please enter a number that is no larger than 5 digits (decimals points included).");
return false;
} else {
if (!inRange(input,5,50)) {
alert("Employee does not meet years/service required for retirement");
return false;
}
return true;
}
}
}
// Validates Final Average Monthly Compensation.
function incCompEntry(FinAvgMoComp) {
var input = parseInt(document.RetBenCalc.FinAvgMoComp.value, 10);
if (isNaN(input)){
alert("Please enter numbers only into this box. Do not use dollar signs or commas.");
return false;
} else {
if (document.RetBenCalc.FinAvgMoComp.value.length >10) {
alert("Please enter a number that is no larger than 10 digits.");
return false;
}
}
return true;
}
Age at Retirement is calculated in quarter year increments; i,e, 50, 50.25, 50.50, 50.75
Years of Service is calculated in quarter year increments; i,e, 20, 20.25, 20.50, 20.75
This estimate shows your projected retirement allowance based on your current salary. It is not a guarantee of future salary, benefits, or continued membership with ICERS or any reciprocal system.