<!-- Dit script is het intellectuele eigendom van DenK Internet Services te Tiel, dé internetspecialist voor het financiële intermediair. -->
<!-- Het is derden niet toegestaan dit script of gedeelten daarvan te koppelen, kopieëren of op welke wijze dan ook te gebruiken zonder uitdrukkelijke schriftelijke toestemming van DenK Internet Services. -->
<!-- mail: info@denk.biz | website: www.denk.biz -->

var hypmax = new Object; 
function Calculator() {
  var valid = "0123456789.,";

  if (theForm1.inkomen1.value.length == 0) {
    alert("U kunt hier uitsluitend cijfers invullen!");
    theForm1.inkomen1.value = 0;
    return false;
  }
  else {
    var ok = "yes";
  }

  var temp;
  for (var i=0; i<theForm1.inkomen1.value.length; i++) {
    temp = "" + theForm1.inkomen1.value.substring(i, i+1);
    if (valid.indexOf(temp) == "-1") 
      ok = "no";   
  }
  if (ok == "no") {
    alert("U kunt hier uitsluitend cijfers invullen!");
    theForm1.inkomen1.focus();
    theForm1.inkomen1.select();
     return false;
  }
  theForm1.inkomen1.value = parseFloat(theForm1.inkomen1.value.replace(",","."));



  if (theForm1.inkomen2.value.length == 0) {
    alert("U kunt hier uitsluitend cijfers invullen!");
    theForm1.inkomen2.value = 0;
    return false;
  }
  else {
    var ok = "yes";
  }
  var temp;

  for (var i=0; i<theForm1.inkomen2.value.length; i++) {
    temp = "" + theForm1.inkomen2.value.substring(i, i+1);
    if (valid.indexOf(temp) == "-1") 
      ok = "no";
  }
  if (ok == "no") {
    alert("U kunt hier uitsluitend cijfers invullen!)");
    theForm1.inkomen2.focus();
    theForm1.inkomen2.select();
    return false;
  }
  theForm1.inkomen2.value = parseFloat(theForm1.inkomen2.value.replace(",","."));



  if (theForm1.rente.value.length == 0) {
    alert("U kunt hier uitsluitend cijfers invullen!");
    theForm1.rente.value = 0;
    return false;
  }
  else {
    var ok = "yes";
  }

  var temp;
  for (var i=0; i<theForm1.rente.value.length; i++) {
    temp = "" + theForm1.rente.value.substring(i, i+1);
    if (valid.indexOf(temp) == "-1")
      ok = "no";
  }
  if (ok == "no") {
    alert("U kunt hier uitsluitend cijfers invullen!");
    theForm1.rente.focus();
    theForm1.rente.select();
    return false;
  }
  theForm1.rente.value = parseFloat(theForm1.rente.value.replace(",","."));


/*var a = eval(theForm1.rente.value);
var x = 0.071946;
var y= Math.pow((1+a/1200), 360);
   x=(y*(a/1200)*12)/(y-1);
   var i1 = eval(theForm1.inkomen1.value);
   var i2 = eval(theForm1.inkomen2.value);
   var itot = i1 + i2 ;
if(itot<52185) {
      if(itot<45378) { 
         if(itot<39933) {
            if(itot<36756) {
               if(itot<35395) {
                  if(itot<33580) {
                     if(itot<31311) {
                        if(itot<27227) {
                           if(itot<17697) {
                              if(itot<17244) {
                                 if(itot<16366) {
                                    if(itot<15882) {
                                       if(itot<15429) {
                                          if(itot<14975) {
                                             if(itot<14521) {
                                                if(itot<14067) {
                                                   if(itot<13613) {
                                                      if(itot<12706) {
                                                         theForm1.totaal.value=("niet mogelijk")
                                                      }
                                                      else {
                                                         
theForm1.totaal.value=(Math.round(eval((itot)*0.215*(1/x)))) 
                                                      }
                                                   }
                                                   else {
                                                      theForm1.totaal.value=(Math.round(eval((itot)*0.244*(1/x)))) 
                                                   }
                                                }
                                                else {
                                                   theForm1.totaal.value=(Math.round(eval((itot)*0.256*(1/x)))) 
                                                }
                                             } 
                                             else {
                                                theForm1.totaal.value=(Math.round(eval((itot)*0.265*(1/x)))) 
                                             }
                                          } 
                                          else {
                                             theForm1.totaal.value=(Math.round(eval((itot)*0.276*(1/x)))) 
                                          }
                                       } 
                                       else {
                                          theForm1.totaal.value=(Math.round(eval((itot)*0.284*(1/x)))) 
                                       }
                                    } 
                                    else {
                                       theForm1.totaal.value=(Math.round(eval((itot)*0.285*(1/x)))) 
                                    }
                                 } 
                                 else {
                                    theForm1.totaal.value=(Math.round(eval((itot)*0.288*(1/x)))) 
                                 }
                              } 
                              else {
                                 theForm1.totaal.value=(Math.round(eval((itot)*0.289*(1/x)))) 
                              }
                           } 
                           else {
                              theForm1.totaal.value=(Math.round(eval((itot)*0.296*(1/x)))) 
                           }
                        } 
                        else {
                           theForm1.totaal.value=(Math.round(eval((itot)*0.299*(1/x)))) 
                        }
                     } 
                     else {
                        theForm1.totaal.value=(Math.round(eval((itot)*0.304*(1/x)))) 
                     }
                  } 
                  else {
                     theForm1.totaal.value=(Math.round(eval((itot)*0.314*(1/x)))) 
                  }
               } 
               else {
                  theForm1.totaal.value=(Math.round(eval((itot)*0.324*(1/x)))) 
               }
            } 
            else {
               theForm1.totaal.value=(Math.round(eval((itot)*0.346*(1/x)))) 
            }
         } 
         else {
            theForm1.totaal.value=(Math.round(eval((itot)*0.35*(1/x)))) 
         }
      } 
      else {
         theForm1.totaal.value=(Math.round(eval((itot)*0.36*(1/x)))) 
      }
   } 
   else {
      theForm1.totaal.value=(Math.round(eval((itot)*0.37*(1/x)))) 
   }*/
}
