function smfFooterHighlight(element, value){
	element.src = "images" + "/" + (value ? "h_" : "") + element.id + ".gif";
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function submitIt( cuanto) {
	var tot;
	var pago_mensual;
	var pago_total;
	var interes_total;
	interes_total = cuanto.plazo.value* ((cuanto.importe.value / 100) * cuanto.interes.value);
	//tot = cuanto.importe.value + ((cuanto.importe.value / 100) * cuanto.interes.value);
	tot = Math.round(cuanto.importe.value/1+interes_total/1);
	//cuanto.mensual.value = Math.round((tot/(cuanto.plazo.value*12))*100)/100;
	pago_mensual = GetMonthlyPayment(cuanto.plazo.value, cuanto.interes.value, cuanto.importe.value);
	cuanto.mensual.value = Math.round(pago_mensual*100)/100;
	//cuanto.total.value = Math.round((pago_mensual * 12 * cuanto.plazo.value)*100)/100;
    pago_total = pago_mensual * 12 * cuanto.plazo.value;
	cuanto.total.value = FormatOutput(pago_total, 2);
	return false;
}

function GetMonthlyPayment(term, rate, loanAmount) {

    if (rate >= 1) {
        (rate = rate / 100);
    }
    rateMonthly = (rate / 12);

    totalPayments = (term * 12);

    if (rate == 0) {
        payment = (loanAmount / totalPayments);
    }

    else {
        payment = (loanAmount * rateMonthly) / (1 - Math.pow((1+rateMonthly), (-1*totalPayments)) );
    }

    return(payment);
}

function FormatOutput(iValue, nDec) {
    var bIsNegative = 0;
    var iPos = 0;
    var sChar = "";
    var sTempNumber = "";
    var sNoChars = "";
    var sDollars = "";
    var sCents = "";
    var sDollarAmount = "";
    var sFormated = "";
    var x = 0;

    if (iValue != "") {

        sTempNumber = iValue + "";
        if (sTempNumber.charAt(0) == "-") {
            bIsNegative = 1;
            sTempNumber = sTempNumber.substring(1, sTempNumber.length);
        }

        sTempNumber
        IndexOfDec = sTempNumber.indexOf(".");

        if (IndexOfDec == -1) {
            sDollars = sTempNumber;
            sCents = "00";
        }
        else if (IndexOfDec == 0) {
            sDollars = "0";
            sCents = sTempNumber.substring(IndexOfDec + 1, sTempNumber.length);
        }
        else {
            sDollars = sTempNumber.substring(0, IndexOfDec);
            if (IndexOfDec == (sTempNumber.length - 1)) {
                sCents = "00";
            }
            else {
                sCents = sTempNumber.substring(IndexOfDec + 1, sTempNumber.length)
                sCents += "0";
                sCents = sCents.charAt(0) + sCents.charAt(1);
            }
        }

        sFormated = sDollars;
        x = sDollars.length;
        iPos = 0;
        while (x > 0) {
            x--;
            sChar = sDollars.charAt(x);
            rounded = Math.round(iPos/3);
            if ( (iPos/3 == rounded ) & (iPos != 0) ) {
                sDollarAmount = "," + sDollarAmount;
            }
            sDollarAmount = sChar +  sDollarAmount;
            iPos++;
        }

        if (nDec) {
          if (bIsNegative) {
              sFormated = "-" + sDollarAmount + "." + sCents + "";
          }
          else {
              sFormated = sDollarAmount + "." + sCents  + "";
          }
	}
        else {
          if (bIsNegative) {
              sFormated = "-" + sDollarAmount + "";
          }
          else {
              sFormated = sDollarAmount + "";
          }
	}

        return (sFormated);
    }
    else {

        return("0" + "");
    }
}
function submitIt2(cuanto) {	
	document.getElementById('result3').value= Math.round((cuanto.brutoanual.value * 0.3)*100)/100;
	//cuanto.result3.value = Math.round((cuanto.brutoanual.value * 0.3)*100)/100;
	return false
}

function calcular() {
	// importe precio estado resultado_total(())
	valor1=document.gastos.importe.value;
	valor2=document.gastos.precio.value;

	// ********************************************************
	// *** SI ESTAN LOS DOS CAMPOS RELLENOS
	if (!(document.gastos.importe.value == "") && !(document.gastos.precio.value == "" )){
		var suma;

	  document.gastos.total.value = valor2 * 0.07;
      buscarvalor(valor1, valor2);

        if (document.gastos.estado.value == 1)
        {// SI ES OBRA NUEVA
  		  //document.f_result.ajd.value = valor2 * 0.005;
		  document.f_result.ivaviv.value = valor2 * 0.07;
		  document.f_result.itp.value = "";
		  document.f_result.impuesto.value = valor1 * 0.005;
		  document.f_result.impuesto2.value = valor2 * 0.005;
		}
		else
		{// SI ES SEGUNDA MANO
		  document.f_result.itp.value = valor2 * 0.07;
  		 //document.f_result.ajd.value = "";
		  document.f_result.ivaviv.value = "";
		  document.f_result.impuesto.value = valor1 * 0.008;
		  document.f_result.impuesto2.value = "";
		}


		document.f_result.comision.value = valor1 * 0.01;
		//document.f_result.impuesto.value = valor1 * 0.0106;

		//document.f_result.comision.value = document.f_result.comision.value / 166.386;
		document.f_result.seguro.value = 300;
		//document.f_result.iva.value = document.f_result.iva.value / 166.386;
		//document.f_result.tasacion.value = document.f_result.tasacion.value / 166.386;
		document.f_result.tasacion.value = 300;
        if (document.gastos.estado.value == 1)
        {// SI ES OBRA NUEVA
	      suma = parseInt(document.f_result.impuesto2.value) + parseInt(document.f_result.seguro.value) + parseInt(document.f_result.comision.value) + parseInt(document.f_result.iva.value) + parseInt(document.f_result.tasacion.value) + parseInt(document.f_result.impuesto.value) + parseInt(document.f_result.notario.value) + parseInt(document.f_result.gestion.value) + parseInt(document.f_result.registro.value) + parseInt(document.f_result.notariocv.value) + parseInt(document.f_result.registrocv.value) + parseInt(document.f_result.gestioncv.value) + parseInt(document.f_result.ivacv.value) + parseInt(document.f_result.ivaviv.value);
		  suma_hipo = parseInt(document.f_result.seguro.value) + parseInt(document.f_result.comision.value) + parseInt(document.f_result.iva.value) + parseInt(document.f_result.tasacion.value) + parseInt(document.f_result.impuesto.value) + parseInt(document.f_result.notario.value) + parseInt(document.f_result.gestion.value) + parseInt(document.f_result.registro.value);
		  suma_compra = parseInt(document.f_result.notariocv.value) + parseInt(document.f_result.impuesto2.value) + parseInt(document.f_result.registrocv.value) + parseInt(document.f_result.gestioncv.value) + parseInt(document.f_result.ivacv.value) + parseInt(document.f_result.ivaviv.value);
        }
        else
        {// SI ES SEGUNDA MANO
          suma = parseInt(document.f_result.seguro.value) + parseInt(document.f_result.comision.value) + parseInt(document.f_result.iva.value) + parseInt(document.f_result.tasacion.value) + parseInt(document.f_result.impuesto.value) + parseInt(document.f_result.notario.value) + parseInt(document.f_result.gestion.value) + parseInt(document.f_result.registro.value) + parseInt(document.f_result.notariocv.value) + parseInt(document.f_result.registrocv.value) + parseInt(document.f_result.gestioncv.value) + parseInt(document.f_result.ivacv.value) + parseInt(document.f_result.itp.value);
		  suma_hipo = parseInt(document.f_result.seguro.value) + parseInt(document.f_result.comision.value) + parseInt(document.f_result.iva.value) + parseInt(document.f_result.tasacion.value) + parseInt(document.f_result.impuesto.value) + parseInt(document.f_result.notario.value) + parseInt(document.f_result.gestion.value) + parseInt(document.f_result.registro.value);
		  suma_compra = parseInt(document.f_result.notariocv.value) + parseInt(document.f_result.registrocv.value) + parseInt(document.f_result.gestioncv.value) + parseInt(document.f_result.ivacv.value) + parseInt(document.f_result.itp.value);
        }

	    // fin de calculos para euros
	    //comienzo de formateo
		document.gastos.total.value = Formato_numero(Math.round(suma));
		document.f_result.comision.value = Formato_numero(Math.round(document.f_result.comision.value));
		document.f_result.iva.value = Formato_numero(Math.round(document.f_result.iva.value));
		document.f_result.tasacion.value = Formato_numero(Math.round(document.f_result.tasacion.value));
		document.f_result.impuesto.value = Formato_numero(Math.round(document.f_result.impuesto.value));
		document.f_result.notario.value = Formato_numero(Math.round(document.f_result.notario.value));
		document.f_result.gestion.value = Formato_numero(Math.round(document.f_result.gestion.value));
		document.f_result.registro.value = Formato_numero(Math.round(document.f_result.registro.value));
		document.f_result.notariocv.value = Formato_numero(Math.round(document.f_result.notariocv.value));
		document.f_result.registrocv.value = Formato_numero(Math.round(document.f_result.registrocv.value));
		document.f_result.ivacv.value = Formato_numero(Math.round(document.f_result.ivacv.value));
		document.f_result.gestioncv.value = Formato_numero(Math.round(document.f_result.gestioncv.value));
		document.f_result.total_compra.value = Formato_numero(Math.round(suma_compra));
		document.f_result.total_hipo.value = Formato_numero(Math.round(suma_hipo));
        if (document.gastos.estado.value == 1)
        {// SI ES OBRA NUEVA
    	//	document.f_result.ajd.value = Formato_numero(Math.round(document.f_result.ajd.value));
	    	document.f_result.ivaviv.value = Formato_numero(Math.round(document.f_result.ivaviv.value));
	    	document.f_result.impuesto2.value = Formato_numero(Math.round(document.f_result.impuesto2.value));
	    }
	    else
	    {// SI ES SEGUNDA MANO
 	    	document.f_result.itp.value = Formato_numero(Math.round(document.f_result.itp.value));
	    }
	}//SI ESTAN LOS DOS CAMPOS RELLENOS

	// ********************************************************
	// *** SI ESTA RELLENO SOLO EL PRIMERO (IMPORTE SOLICITADO)
	if (!(valor1 == "") && (valor2 == "")){
		var suma;
		valor2 = 0;
        // buscarvalor(valor1, valor2);

		document.f_result.comision.value = valor1 * 0.01;
		// document.f_result.impuesto.value = valor1 * 0.0106;
		document.f_result.impuesto.value = valor1 * 0.005;

		document.f_result.seguro.value = 300;
		document.f_result.tasacion.value = 300;

	     suma_hipo = parseInt(document.f_result.seguro.value) + parseInt(document.f_result.comision.value) + parseInt(document.f_result.iva.value) + parseInt(document.f_result.tasacion.value) + parseInt(document.f_result.impuesto.value) + parseInt(document.f_result.notario.value) + parseInt(document.f_result.gestion.value) + parseInt(document.f_result.registro.value);
		 suma_compra = "";
		 suma = suma_hipo;

	    // fin de calculos para euros
	    //comienzo de formateo
		document.gastos.total.value = Formato_numero(Math.round(suma));
		document.f_result.comision.value = Formato_numero(Math.round(document.f_result.comision.value));
		document.f_result.iva.value = Formato_numero(Math.round(document.f_result.iva.value));
		document.f_result.tasacion.value = Formato_numero(Math.round(document.f_result.tasacion.value));
		document.f_result.impuesto.value = Formato_numero(Math.round(document.f_result.impuesto.value));
		document.f_result.notario.value = Formato_numero(Math.round(document.f_result.notario.value));
		document.f_result.gestion.value = Formato_numero(Math.round(document.f_result.gestion.value));
		document.f_result.registro.value = Formato_numero(Math.round(document.f_result.registro.value));
		document.f_result.total_hipo.value = Formato_numero(Math.round(suma_hipo));

		document.f_result.notariocv.value = "";
		document.f_result.registrocv.value = "";
		document.f_result.ivacv.value = "";
		document.f_result.gestioncv.value = "";
		document.f_result.total_compra.value = "";
		//document.f_result.ajd.value = "";
		document.f_result.ivaviv.value = "";
		document.f_result.itp.value = "";
	}// SI ESTA RELLENO SOLO EL PRIMERO (IMPORTE SOLICITADO)

	// ********************************************************
	// *** SI ESTA RELLENO SOLO EL SEGUNDO( IMPORTE DE LA VIVIENDA)
	if ((valor1 == "") && !(valor2 == "")){
	//	if ((document.formu.importeh.value == "") && !(document.formu.valorh.value == "" )){
		var suma;
		valor1 = 0;
		document.f_result.seguro.value = "";
        // buscarvalor(valor1, valor2);

        if (document.gastos.estado.value == 1)
        { // SI ES OBRA NUEVA
  		  //document.f_result.ajd.value = valor2 * 0.05;
		  document.f_result.ivaviv.value = valor2 * 0.07;
		  document.f_result.itp.value = "";
		  document.f_result.impuesto2.value = valor2 * 0.005;
		}
		else
		{ // SI ES SEGUNDA MANO
		  document.f_result.itp.value = valor2 * 0.07;
  		  //document.f_result.ajd.value = "";
		  document.f_result.ivaviv.value = "";
		  document.f_result.impuesto2.value = "";
		}

        if (document.gastos.estado.value == 1)
		{// SI ES OBRA NUEVA
		suma_hipo = "";
		suma_compra = parseInt(document.f_result.impuesto2.value) + parseInt(document.f_result.notariocv.value) + parseInt(document.f_result.registrocv.value) + parseInt(document.f_result.gestioncv.value) + parseInt(document.f_result.ivacv.value) + parseInt(document.f_result.ivaviv.value);
		suma = suma_compra;
		}
		else
		{// SI ES SEGUNDA MANO
		suma_hipo = "";
		suma_compra = parseInt(document.f_result.notariocv.value) + parseInt(document.f_result.registrocv.value) + parseInt(document.f_result.gestioncv.value) + parseInt(document.f_result.ivacv.value) + parseInt(document.f_result.itp.value);
		suma = suma_compra;
		}

alert ("PUNTO 444");
	    // fin de calculos para euros
	    //comienzo de formateo
		document.gastos.total.value = Formato_numero(Math.round(suma));
		document.f_result.notariocv.value = Formato_numero(Math.round(document.f_result.notariocv.value));
		document.f_result.registrocv.value = Formato_numero(Math.round(document.f_result.registrocv.value));
		document.f_result.ivacv.value = Formato_numero(Math.round(document.f_result.ivacv.value));
		document.f_result.gestioncv.value = Formato_numero(Math.round(document.f_result.gestioncv.value));
		document.f_result.total_compra.value = Formato_numero(Math.round(suma_compra));
		document.f_result.total_hipo.value = "";
        if (document.gastos.estado.value == 1)
        {// SI ES OBRA NUEVA
//        		document.f_result.ajd.value = Formato_numero(Math.round(document.f_result.ajd.value));
    	    alert ("xxx teat nueva ++++++++");
	    	document.f_result.ivaviv.value = Formato_numero(Math.round(document.f_result.ivaviv.value));
	    	document.f_result.impuesto2.value = Formato_numero(Math.round(document.f_result.impuesto2.value));
	    }
	    else
	    {// SI ES SEGUNDA MANO
    	    alert ("xxx teatSEGUNDA MANO ------");
 	    	document.f_result.itp.value = Formato_numero(Math.round(document.f_result.itp.value));
	    }

		document.f_result.comision.value = "";
		document.f_result.iva.value = "";
		document.f_result.tasacion.value = "";
		document.f_result.impuesto.value = "";
		document.f_result.notario.value = "";
		document.f_result.gestion.value = "";
		document.f_result.registro.value = "";
		document.gastos.total.value = document.gastos.total_compra.value;
	} //SI ESTA RELLENO SOLO EL SEGUNDO( IMPORTE DE LA VIVIENDA)


	// ********************************************************
	// *** SI LOS DOS ESTAN VACIOS
	if ((valor1 == "") && (valor2 == "" )){
			document.gastos.total.value = "";

			document.f_result.seguro.value = "";
			document.f_result.tasacion.value = "";
			document.f_result.comision.value = "";
			document.f_result.iva.value = "";
			document.f_result.tasacion.value = "";
			document.f_result.impuesto.value = "";
			document.f_result.impuesto2.value = "";
			document.f_result.notario.value = "";
			document.f_result.gestion.value = "";
			document.f_result.registro.value = "";
			document.f_result.notariocv.value = "";
			document.f_result.registrocv.value = "";
			document.f_result.ivacv.value = "";
			document.f_result.gestioncv.value = "";
			document.f_result.total_compra.value = "";
			document.f_result.total_hipo.value = "";
//			document.f_result.ajd.value = "";
    	    document.f_result.ivaviv.value = "";
    	    alert ("Por favor rellene alguno de los importes");

	}//SI LOS DOS ESTAN VACIOS

	return false;
}// function calcular_onclick()


function Formato_numero(numero){

	var nombre = "";
	var num = numero;
	if (num != ""){

		var str = "";
		while (num > 999){

			n1 = Math.floor(num/1000);
			n2 = num - 1000 * n1;

			if (n2 < 10){
			   n2 = "00" + n2;
	        	}
			else{
			   if (n2 < 100)
	       		      n2 = "0" + n2;
	                }
			str = "." + n2 + str;
			num = n1;

		}
		str = num + str;
	}
	return (str);
}


function buscarvalor(v1, v2) {

	var show_euros = true;
	if ( show_euros ){  // solo usamos euros
		var cambioEUR = 166.386;
		var cambio = 166.386;
		v1 = v1 * 166.386;
		v2 = v2 * 166.386;
	} else {
		var cambioPTS = 1;
	}

	if (v1 > "95000000") {
			document.f_result.notario.value = Formato_numero(Math.round( 137000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 87000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "90000000" && v1 <= "95000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 134500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 84500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "85000000" && v1 <= "90000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 132000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 82000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "80000000" && v1 <= "85000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 129500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 79500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "75000000" && v1 <= "80000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 127000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 77000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "70000000" && v1 <= "75000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 124500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 74500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "65000000" && v1 <= "70000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 122000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 72000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "60000000" && v1 <= "65000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 119500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 69500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "55000000" && v1 <= "60000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 117000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 67000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "50000000" && v1 <= "55000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 114500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 10320 / cambio));
	}
	if (v1 > "45000000" && v1 <= "50000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 112000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 62000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "40000000" && v1 <= "45000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 109500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 59500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "35000000" && v1 <= "40000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 107000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 57000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "30000000" && v1 <= "35000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 104500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 54500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "29000000" && v1 <= "30000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 102000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 52000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "28000000" && v1 <= "29000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 100500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 51000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));

	}if (v1 > "27000000" && v1 <= "28000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 99000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "26000000" && v1 <= "27000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 97500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 49000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "25000000" && v1 <= "26000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 96000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 48000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "24000000" && v1 <= "24000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 94500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 47000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "23000000" && v1 <= "24000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 93000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 46000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "22000000" && v1 <= "23000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 91500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 45000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "21000000" && v1 <= "22000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 90000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 44000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "20000000" && v1 <= "21000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 88500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 43000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 7920 / cambio));
	}
	if (v1 > "19000000" && v1 <= "20000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 87000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 42500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 39500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 6320 / cambio));
	}
	if (v1 > "18000000" && v1 <= "19000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 85500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 41000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 39500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 6320 / cambio));
	}
	if (v1 > "17000000" && v1 <= "18000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 84000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 39500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 39500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 6320 / cambio));
	}
	if (v1 > "16000000" && v1 <= "17000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 82500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 38000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 39500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 6320 / cambio));
	}
	if (v1 > "15000000" && v1 <= "16000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 81000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 36500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 39500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 6320 / cambio));
	}
	if (v1 > "14000000" && v1 <= "15000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 79500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 5520 / cambio));
	}
	if (v1 > "13000000" && v1 <= "14000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 78000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 5520 / cambio));
	}
	if (v1 > "12000000" && v1 <= "13000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 76500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 33000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 5520 / cambio));
	}
	if (v1 > "11000000" && v1 <= "12000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 75000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 31500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 5520 / cambio));
	}
	if (v1 > "10000000" && v1 <= "11000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 73500 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 5520 / cambio));
	}


	if (v1 > "9000000" && v1 <= "10000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 72000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 28500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 4320 / cambio));
	}
	if (v1 > "8000000" && v1 <= "9000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 71000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 4320 / cambio));
	}
	if (v1 > "7000000" && v1 <= "8000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 67000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 25500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 4320 / cambio));
	}
	if (v1 > "6000000" && v1 <= "7000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 63000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 24000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 4320 / cambio));
	}
	if (v1 > "5000000" && v1 <= "6000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 59000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 22500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 4320 / cambio));
	}
	if (v1 > "4000000" && v1 <= "5000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 55000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 21000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 22000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 3520 / cambio));
	}
	if (v1 > "3000000" && v1 <= "4000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 51000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 19500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 22000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 3520 / cambio));
	}
	if (v1 > "2000000" && v1 <= "3000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 47000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 18000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 22000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 3520 / cambio));
	}
	if (v1 > "1000000" && v1 <= "2000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 43000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 16500 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 22000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 3520 / cambio));
	}
	if (v1 <= "1000000"){
			document.f_result.notario.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.registro.value = Formato_numero(Math.round( 15000 / cambio));
			document.f_result.gestion.value = Formato_numero(Math.round( 22000 / cambio));
			document.f_result.iva.value = Formato_numero(Math.round( 3520 / cambio));
	}
	// fin calculo de gastos para hipoteca

	if (v2 > "95000000") {
			document.f_result.notariocv.value = Formato_numero(Math.round( 150000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 84000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "90000000" && v2 <= "95000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 145000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 82000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "85000000" && v2 <= "90000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 140000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 80000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "80000000" && v2 <= "85000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 135000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 78000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "75000000" && v2 <= "80000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 130000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 76000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "70000000" && v2 <= "75000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 125000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 74000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "65000000" && v2 <= "70000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 120000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 72000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 50000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 8000 / cambio));
	}
	if (v2 > "60000000" && v2 <= "65000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 115000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 70000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 45000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 7200 / cambio));
	}
	if (v2 > "55000000" && v2 <= "60000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 110000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 68000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 45000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 7200 / cambio));
	}
	if (v2 > "50000000" && v2 <= "55000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 105000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 66000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 45000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 7200 / cambio));
	}
	if (v2 > "45000000" && v2 <= "50000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 100000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 64000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "40000000" && v2 <= "45000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 95000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 62000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "35000000" && v2 <= "40000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 92500 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 60000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "30000000" && v2 <= "35000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 90000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 58000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "29000000" && v2 <= "30000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 86000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 54000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "28000000" && v2 <= "29000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 85000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 52500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));

	}if (v2 > "27000000" && v2 <= "28000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 84000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 51000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "26000000" && v2 <= "27000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 83000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 49500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "25000000" && v2 <= "26000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 82000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 48000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "24000000" && v2 <= "25000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 81000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 46500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "23000000" && v2 <= "24000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 80000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 45000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "22000000" && v2 <= "23000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 79000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 43500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "21000000" && v2 <= "22000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 78000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 42000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "20000000" && v2 <= "21000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 77000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 40500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 40000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 6400 / cambio));
	}
	if (v2 > "19000000" && v2 <= "20000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 76000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 39000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 5600 / cambio));
	}
	if (v2 > "18000000" && v2 <= "19000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 75000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 37500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 5600 / cambio));
	}
	if (v2 > "17000000" && v2 <= "18000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 74000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 36000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 5600 / cambio));
	}
	if (v2 > "16000000" && v2 <= "17000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 73000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 34500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 5600 / cambio));
	}
	if (v2 > "15000000" && v2 <= "16000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 72000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 33000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 35000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 5600 / cambio));
	}
	if (v2 > "14000000" && v2 <= "15000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 71000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 31500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 4800 / cambio));
	}
	if (v2 > "13000000" && v2 <= "14000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 70000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 4800 / cambio));
	}
	if (v2 > "12000000" && v2 <= "13000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 69000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 28500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 4800 / cambio));
	}
	if (v2 > "11000000" && v2 <= "12000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 68000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 27000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 4800 / cambio));
	}
	if (v2 > "10000000" && v2 <= "11000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 67000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 25500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 30000 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 4800 / cambio));
	}
	if (v2 > "9000000" && v2 <= "10000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 66000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 24000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 22500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 3600 / cambio));
	}
	if (v2 > "8000000" && v2 <= "9000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 64500 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 25500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 22500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 3600 / cambio));
	}
	if (v2 > "7000000" && v2 <= "8000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 63000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 21000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 22500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 3600 / cambio));
	}
	if (v2 > "6000000" && v2 <= "7000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 61500 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 19500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 22500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 3600 / cambio));
	}
	if (v2 > "5000000" && v2 <= "6000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 60000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 18000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 22500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 3600 / cambio));
	}
	if (v2 > "4000000" && v2 <= "5000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 56000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 16500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 17500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 2800 / cambio));
	}
	if (v2 > "3000000" && v2 <= "4000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 48000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 15000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 17500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 2800 / cambio));
	}
	if (v2 > "2000000" && v2 <= "3000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 43000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 13500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 17500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 2800 / cambio));
	}
	if (v2 > "1000000" && v2 <= "2000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 38500 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 12000 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 17500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 2800 / cambio));
	}
	if (v2 <= "1000000"){
			document.f_result.notariocv.value = Formato_numero(Math.round( 34000 / cambio));
			document.f_result.registrocv.value = Formato_numero(Math.round( 10500 / cambio));
			document.f_result.gestioncv.value = Formato_numero(Math.round( 17500 / cambio));
			document.f_result.ivacv.value = Formato_numero(Math.round( 2800 / cambio));
	}

}


