/*  Tax Fees Calculator Modification
 *  (c) 2007 J.M.Vreskoff office@mydone.org
/*--------------------------------------------------------------------------*/


function fees(){
  if (val.value <= 5128205) {
  if(val.value <= 100) { nottmp = 8; }
  else if(val.value <= 513) { nottmp = (val.value-100)* 0.015 + 7; }
  else if(val.value > 513 && val.value <= 5129) { nottmp = val.value / 100 + 9; }
  else if(val.value > 5129 && val.value <= 25641) { nottmp = val.value * 0.005 + 34; }
  else if(val.value > 25641 && val.value <= 51282) { nottmp = val.value * 0.002 + 110; }
  else if(val.value > 51282) { nottmp = val.value * 0.001 + 160; }
  if(val.value * 0.001 < 5) { var e = 5; } else { var e = val.value * 0.001; }
  enter.innerHTML = Math.round(e); 
  municipality.innerHTML = Math.round(val.value * 0.02);
  notarial.innerHTML = Math.round(nottmp);
  total.innerHTML = Math.round(e + 1.53 + val.value * 0.02 + 3 + 1 + nottmp);
 }  
}

function taxi(){
  if (val.value <= 9999999) {
  if(val.value <= 100) { nottmp = 15; }
  else if(val.value <= 1000) { nottmp = (val.value-100)* 0.015 + 15; }
  else if(val.value > 1000 && val.value <= 10000) { nottmp = val.value / 100 + 18.5; }
  else if(val.value > 10000 && val.value <= 50000) { nottmp = val.value * 0.005 + 68.5; }
  else if(val.value > 50000 && val.value <= 100000) { nottmp = val.value * 0.002 + 218.5; }
  else if(val.value > 100000) { nottmp = val.value * 0.001 + 318; }
  if(val.value * 0.001 < 5) { var e = 5; } else { var e = val.value * 0.001; }
  enter.innerHTML = Math.round(e); 
  municipality.innerHTML = Math.round(val.value * 0.02);
  notarial.innerHTML = Math.round(nottmp);
  total.innerHTML = Math.round(e + 3 + val.value * 0.02 + 6 + 2 + nottmp);
 }  
}