function tax()
   {
//lettura dati
  var g = parseFloat (document.form2.tas.value);
  var f = parseFloat (document.form2.tem.value);
  var z = parseInt (document.form2.modal.value);


if (z==1) j=(((Math.pow((1+(g/100)),f)) -1)/f)*100;
else if(z==2) j=((Math.exp((Math.log((1+((g/100)*f))))/f)) - 1)*100;
document.form2.total.value= Math.round(j*1000000)/1000000;

}
