function frais_de_notaire(montant_achatnet,nature)
{

	if (( isNaN(parseInt(montant_achatnet,10))) || (montant_achatnet==0)){
		return(0);
	}
	if (nature == 7) return(0);


	var montant,natbien,honoraires,taxes,fraisnotaire,taux,ajout,nbTranche;
	honoraires = 0;
	montant    = parseInt(montant_achatnet,10);
	if (nature == 1) natbien = "neuf";
	if (nature == 2) natbien = "ancien";
	if (nature == 3) natbien = "batir";


	nbTranche = 4;
	trancheD  = new Array(    0,  3051,   6101,   16771 );
	trancheF  = new Array( 3050,  6100,  16770, 99999999);
	taux_0    = new Array(    5,   3.3,   1.65,    0.825);
	ajout_0   = new Array(    0, 51.85,  152.5,   290.85);


	tauxAnc  = 5.09;
	tauxNeu  = 0.715;
	tauxBat  = 5.09;
	tauxTVA  = 19.6;
	

	montant = Math.round(montant);
	for (i=0; i < nbTranche ;i++) {
		if(trancheD[i]<montant && montant<trancheF[i]) {
			taux  = taux_0[i];
			ajout = ajout_0[i];
			break;
		}
	}
	honoraires = (montant*taux/100+ajout)*(1+tauxTVA/100);


	if (natbien=="neuf") 		taxes = montant * tauxNeu/100;
	if (natbien=="ancien") 	taxes = montant * tauxAnc/100;
	if (natbien=="batir") 	taxes = montant * tauxBat/100;


	fraisdivers = 1007 + montant/1000;


	fraisnotaire = honoraires + fraisdivers + taxes ;
	fraisnotaire = Math.round(fraisnotaire/100)*100;

	return(fraisnotaire);
}