// mediatix.com rs 18/12/2006
function convertClick() {
	if (verifValeurs()) {
		monnaie=1-monnaie;
		coeff=(monnaie==1)?1/pariteEuro:pariteEuro;
		document.frm.revenu.value=inttostr(strtoint(document.frm.revenu.value)*coeff);
		document.frm.prixLogement.value=inttostr(strtoint(document.frm.prixLogement.value)*coeff);
		document.frm.apport.value=inttostr(strtoint(document.frm.apport.value)*coeff);
		ongletClick(onglet);
	}
	return false;
}
function ongletClick(ong) {
	if (verifValeurs()) {
		l="index.php?client="+client+"&tpl="+template+"&ong="+ong+"&mnn="+monnaie;
		l+="&rev="+strtoint(document.frm.revenu.value)+"&prx="+strtoint(document.frm.prixLogement.value)+"&apr="+strtoint(document.frm.apport.value)

		if ((onglet==1)||(onglet==9)) {
			l+="&zon="+(document.frm.zone.options[document.frm.zone.selectedIndex].value);
			l+="&zus="+(document.frm.zus.options[document.frm.zus.selectedIndex].value);
			l+="&prs="+(document.frm.nbPersonnes.options[document.frm.nbPersonnes.selectedIndex].value);
		} else {
			l+="&zon="+document.frm.zone.value;
			l+="&zus="+document.frm.zus.value;
			l+="&prs="+document.frm.nbPersonnes.value;
		}
		
		location=l;
	}
	return false;
}
function verifValeurs() {
	var verifValeurs=0;
	if (strtoint(document.frm.revenu.value)<=0)
		alert("Veuillez indiquez votre revenu net imposable");
	else
		verifValeurs=1;
	return verifValeurs;
}
function calcClick() {
	return ongletClick((onglet==9)?9:(onglet+1));
}
