function docalc(){
var ink = document.forms[0].inkomen.selectedIndex ;
var rate_l4k1 = new Array(99);/* kind 1 jonger dan 4 jaar*/
rate_l4k1[0] = 4.47;
rate_l4k1[1] = 4.44;
rate_l4k1[2] = 4.41;
rate_l4k1[3] = 4.39;
rate_l4k1[4] = 4.37;
rate_l4k1[5] = 4.34;
rate_l4k1[6] = 4.31;
rate_l4k1[7] = 4.29;
rate_l4k1[8] = 4.26;
rate_l4k1[9] = 4.24;
rate_l4k1[10] = 4.21;
rate_l4k1[11] = 4.19;
rate_l4k1[12] = 4.16;
rate_l4k1[13] = 4.13;
rate_l4k1[14] = 4.10;
rate_l4k1[15] = 4.07;
rate_l4k1[16] = 4.05;
rate_l4k1[17] = 4.02;
rate_l4k1[18] = 3.99;
rate_l4k1[19] = 3.97;
rate_l4k1[20] = 3.94;
rate_l4k1[21] = 3.92;
rate_l4k1[22] = 3.88;
rate_l4k1[23] = 3.83;
rate_l4k1[24] = 3.76;
rate_l4k1[25] = 3.67;
rate_l4k1[26] = 3.59;
rate_l4k1[27] = 3.50;
rate_l4k1[28] = 3.41;
rate_l4k1[29] = 3.33;
rate_l4k1[30] = 3.24;
rate_l4k1[31] = 3.16;
rate_l4k1[32] = 3.07;
rate_l4k1[33] = 2.99;
rate_l4k1[34] = 2.90;
rate_l4k1[35] = 2.81;
rate_l4k1[36] = 2.73;
rate_l4k1[37] = 2.64;
rate_l4k1[38] = 2.56;
rate_l4k1[39] = 2.47;
rate_l4k1[40] = 2.39;
rate_l4k1[41] = 2.30;
rate_l4k1[42] = 2.22;
rate_l4k1[43] = 2.13;
rate_l4k1[44] = 2.05;
rate_l4k1[45] = 1.96;
rate_l4k1[46] = 1.88;
rate_l4k1[47] = 1.79;
rate_l4k1[48] = 1.71;
rate_l4k1[49] = 1.62;
rate_l4k1[50] = 1.54;
rate_l4k1[51] = 1.45;
rate_l4k1[52] = 1.37;
rate_l4k1[53] = 1.28;
rate_l4k1[54] = 1.19;
rate_l4k1[55] = 1.11;
rate_l4k1[56] = 1.02;
rate_l4k1[57] = 0.94;
rate_l4k1[58] = 0.85;
rate_l4k1[59] = 0.76;

var rate_h4k1 = new Array(99);/* kind 1 ouder dan 4 jaar*/
rate_h4k1[0] = 4.62;
rate_h4k1[1] = 4.60;
rate_h4k1[2] = 4.57;
rate_h4k1[3] = 4.54;
rate_h4k1[4] = 4.52;
rate_h4k1[5] = 4.49;
rate_h4k1[6] = 4.46;
rate_h4k1[7] = 4.44;
rate_h4k1[8] = 4.41;
rate_h4k1[9] = 4.39;
rate_h4k1[10] = 4.36;
rate_h4k1[11] = 4.33;
rate_h4k1[12] = 4.30;
rate_h4k1[13] = 4.27;
rate_h4k1[14] = 4.25;
rate_h4k1[15] = 4.22;
rate_h4k1[16] = 4.19;
rate_h4k1[17] = 4.16;
rate_h4k1[18] = 4.13;
rate_h4k1[19] = 4.11;
rate_h4k1[20] = 4.08;
rate_h4k1[21] = 4.06;
rate_h4k1[22] = 4.02;
rate_h4k1[23] = 3.97;
rate_h4k1[24] = 3.89;
rate_h4k1[25] = 3.80;
rate_h4k1[26] = 3.72;
rate_h4k1[27] = 3.63;
rate_h4k1[28] = 3.54;
rate_h4k1[29] = 3.45;
rate_h4k1[30] = 3.36;
rate_h4k1[31] = 3.28;
rate_h4k1[32] = 3.19;
rate_h4k1[33] = 3.10;
rate_h4k1[34] = 3.01;
rate_h4k1[35] = 2.92;
rate_h4k1[36] = 2.84;
rate_h4k1[37] = 2.75;
rate_h4k1[38] = 2.66;
rate_h4k1[39] = 2.57;
rate_h4k1[40] = 2.48;
rate_h4k1[41] = 2.40;
rate_h4k1[42] = 2.31;
rate_h4k1[43] = 2.23;
rate_h4k1[44] = 2.14;
rate_h4k1[45] = 2.05;
rate_h4k1[46] = 1.96;
rate_h4k1[47] = 1.87;
rate_h4k1[48] = 1.79;
rate_h4k1[49] = 1.70;
rate_h4k1[50] = 1.61;
rate_h4k1[51] = 1.52;
rate_h4k1[52] = 1.44;
rate_h4k1[53] = 1.35;
rate_h4k1[54] = 1.26;
rate_h4k1[55] = 1.17;
rate_h4k1[56] = 1.08;
rate_h4k1[57] = 1.00;
rate_h4k1[58] = 0.91;
rate_h4k1[59] = 0.82;

var rate_l4k2 = new Array(99);/* kind 12 e.v. jonger dan 4 jaar*/
rate_l4k2[0] = 4.44;
rate_l4k2[1] = 4.44;
rate_l4k2[2] = 4.44;
rate_l4k2[3] = 4.44;
rate_l4k2[4] = 4.44;
rate_l4k2[5] = 4.44;
rate_l4k2[6] = 4.44;
rate_l4k2[7] = 4.44;
rate_l4k2[8] = 4.44;
rate_l4k2[9] = 4.44;
rate_l4k2[10] = 4.44;
rate_l4k2[11] = 4.44;
rate_l4k2[12] = 4.44;
rate_l4k2[13] = 4.44;
rate_l4k2[14] = 4.38;
rate_l4k2[15] = 4.38;
rate_l4k2[16] = 4.38;
rate_l4k2[17] = 4.38;
rate_l4k2[18] = 4.38;
rate_l4k2[19] = 4.38;
rate_l4k2[20] = 4.38;
rate_l4k2[21] = 4.38;
rate_l4k2[22] = 4.38;
rate_l4k2[23] = 4.26;
rate_l4k2[24] = 4.26;
rate_l4k2[25] = 4.26;
rate_l4k2[26] = 4.26;
rate_l4k2[27] = 4.26;
rate_l4k2[28] = 4.26;
rate_l4k2[29] = 4.26;
rate_l4k2[30] = 4.26;
rate_l4k2[31] = 4.26;
rate_l4k2[32] = 4.26;
rate_l4k2[33] = 4.26;
rate_l4k2[34] = 4.19;
rate_l4k2[35] = 4.19;
rate_l4k2[36] = 4.19;
rate_l4k2[37] = 4.19;
rate_l4k2[38] = 4.19;
rate_l4k2[39] = 4.19;
rate_l4k2[40] = 4.19;
rate_l4k2[41] = 4.19;
rate_l4k2[42] = 4.19;
rate_l4k2[43] = 4.19;
rate_l4k2[44] = 4.19;
rate_l4k2[45] = 4.14;
rate_l4k2[46] = 4.14;
rate_l4k2[47] = 4.14;
rate_l4k2[48] = 4.14;
rate_l4k2[49] = 4.14;
rate_l4k2[50] = 4.14;
rate_l4k2[51] = 4.14;
rate_l4k2[52] = 4.14;
rate_l4k2[53] = 4.14;
rate_l4k2[54] = 4.14;
rate_l4k2[55] = 4.14;
rate_l4k2[56] = 4.14;
rate_l4k2[57] = 4.14;
rate_l4k2[58] = 4.14;
rate_l4k2[59] = 4.14;

var rate_h4k2 = new Array(99);/* kind 2 e.v. ouder dan 4 jaar*/
rate_h4k2[0] = 4.58;
rate_h4k2[1] = 4.58;
rate_h4k2[2] = 4.58;
rate_h4k2[3] = 4.58;
rate_h4k2[4] = 4.58;
rate_h4k2[5] = 4.58;
rate_h4k2[6] = 4.58;
rate_h4k2[7] = 4.58;
rate_h4k2[8] = 4.58;
rate_h4k2[9] = 4.58;
rate_h4k2[10] = 4.58;
rate_h4k2[11] = 4.58;
rate_h4k2[12] = 4.58;
rate_h4k2[13] = 4.58;
rate_h4k2[14] = 4.52;
rate_h4k2[15] = 4.52;
rate_h4k2[16] = 4.52;
rate_h4k2[17] = 4.52;
rate_h4k2[18] = 4.52;
rate_h4k2[19] = 4.52;
rate_h4k2[20] = 4.52;
rate_h4k2[21] = 4.52;
rate_h4k2[22] = 4.52;
rate_h4k2[23] = 4.45;
rate_h4k2[24] = 4.45;
rate_h4k2[25] = 4.45;
rate_h4k2[26] = 4.45;
rate_h4k2[27] = 4.45;
rate_h4k2[28] = 4.45;
rate_h4k2[29] = 4.40;
rate_h4k2[30] = 4.40;
rate_h4k2[31] = 4.40;
rate_h4k2[32] = 4.40;
rate_h4k2[33] = 4.40;
rate_h4k2[34] = 4.30;
rate_h4k2[35] = 4.30;
rate_h4k2[36] = 4.30;
rate_h4k2[37] = 4.30;
rate_h4k2[38] = 4.30;
rate_h4k2[39] = 4.30;
rate_h4k2[40] = 4.30;
rate_h4k2[41] = 4.30;
rate_h4k2[42] = 4.30;
rate_h4k2[43] = 4.30;
rate_h4k2[44] = 4.30;
rate_h4k2[45] = 4.25;
rate_h4k2[46] = 4.25;
rate_h4k2[47] = 4.25;
rate_h4k2[48] = 4.25;
rate_h4k2[49] = 4.25;
rate_h4k2[50] = 4.25;
rate_h4k2[51] = 4.25;
rate_h4k2[52] = 4.25;
rate_h4k2[53] = 4.25;
rate_h4k2[54] = 4.25;
rate_h4k2[55] = 4.25;
rate_h4k2[56] = 4.25;
rate_h4k2[57] = 4.25;
rate_h4k2[58] = 4.25;
rate_h4k2[59] = 4.25;

var opslag = 0;
var som1 = 0;
var som2 = 0;
var som3 = 0;
var som4 = 0;
var subsom1 = 0;
var subsom2 = 0;
var subsom3 = 0;
var subsom4 = 0;


//alert(document.all.kind1_4jaar.value) ;
if (document.forms[0].kind1_4jaar[1].checked) {
// 1e kind jonger dan 4
var som1 = rate_l4k1[ink] + opslag;
} else {
// 1e kind 4 jaar of ouder
var som1 = rate_h4k1[ink] + opslag;
}

// kind 2
if (document.forms[0].kind2_4jaar[1].checked) {
// 1e kind jonger dan 4
var som2 = rate_l4k2[ink] + opslag;
} else {
// 1e kind 4 jaar of ouder
var som2 = rate_h4k2[ink] + opslag;
}

// kind 3
if (document.forms[0].kind3_4jaar[1].checked) {
// 1e kind jonger dan 4
var som3 = rate_l4k2[ink] + opslag;
} else {
// 1e kind 4 jaar of ouder
var som3 = rate_h4k2[ink] + opslag;
}

// kind 4
if (document.forms[0].kind4_4jaar[1].checked) {
// 1e kind jonger dan 4
var som4 = rate_l4k2[ink] + opslag;
} else {
// 1e kind 4 jaar of ouder
var som4 = rate_h4k2[ink] + opslag;
}

var uren1 = document.forms[0].urenkind1.value ;
var uren2 = document.forms[0].urenkind2.value ;
var uren3 = document.forms[0].urenkind3.value ;
var uren4 = document.forms[0].urenkind4.value ;

if (document.forms[0].urenkind1.value > 0){
subsom1 = som1 ;
}
if (document.forms[0].urenkind2.value > 0){
subsom2 = som2 ;
}
if (document.forms[0].urenkind3.value > 0){
subsom3 = som3 ;
}
if (document.forms[0].urenkind4.value > 0){
subsom4 = som4 ;
}

var result1 = som1 * uren1;
var result2 = som2 * uren2;
var result3 = som3 * uren3;
var result4 = som4 * uren4;
var subtotal = subsom1 + subsom2 + subsom3 + subsom4 ;
var total = result1 + result2 + result3 + result4 ;

document.forms[0].Peruur.value =  '€ '+ (Math.round(subtotal*100)/100).toFixed(2) ;
document.forms[0].Permaand.value = '€ '+(Math.round((total * (52/12))*100)/100).toFixed(2);
document.forms[0].Perjaar.value = '€ '+(Math.round((total * 52)*100)/100).toFixed(2);
// document.all.melding.innerHTML = '<br>Heeft u een interessant voordeel?<br> Klik hieronder op de link om in te schrijven.<p><a href=\"http://www.darkom.nl/inschrijven.html\" target=\"_self\">http://www.darkom.nl/inschrijven.html</a> ';
}

