function demessine(){
var totalpay = 0;

var demessineArray = xmldata( 0, core + 'extend/ext_wsquery.php?swtype=object&objectName=demessineArray' );
demessineArray = demessineArray.split(",")
investMin = demessineArray[0];
investMax = demessineArray[1];
fineCoef = demessineArray[2];

totalpay = eval(document.devis.vala.value);
statusmar = eval(document.devis.statype.value);
perchargnb = eval(document.devis.pernb.value);
timp = TotalImpotCalc((totalpay * 0.9),statusmar,perchargnb);

if(totalpay > 0){
	document.getElementById("realcost").innerHTML = "Déduction 10% : " + FormatNumber(totalpay * 0.1) + " \u20AC";
	document.getElementById("baseimpots").innerHTML = "Impots avant défiscalisation : " + timp + " \u20AC";
}

propstatus = eval(document.devis.statype.value);

tvacoef = 100 / 119.6;
invesht = eval(document.devis.totinv.value) * tvacoef;
investva = eval(document.devis.totinv.value) - invesht;

if(propstatus == 1){
	if(invesht > investMin)
		invesht = investMin;
}

if(propstatus == 2){
	if(invesht > investMax)
		invesht = investMax;
}

finredimp = invesht * fineCoef;

anredprop = finredimp / 6;
anredtva = investva / 20;
imptot = timp * 20;
ecotot = finredimp;
ecototva = finredimp + investva;

if(anredprop > 0)
	document.getElementById("ecoann").innerHTML = FormatNumber(anredprop) + " \u20AC / an sur 6 ans.";

if(anredtva > 0)
	document.getElementById("recupanntva").innerHTML = FormatNumber(anredtva) + " \u20AC / an sur 20 ans.";

if(ecotot > 0)
	document.getElementById("recuptotal").innerHTML = FormatNumber(ecotot) + " \u20AC sur 6 ans.";

if(ecototva > 0)
	document.getElementById("recuptotaltva").innerHTML = FormatNumber(ecototva) + " \u20AC sur 20 ans";

}