function convertClick() {
	if (verifValeurs()) {
		monnaie=1-monnaie;
		coeff=(monnaie==1)?1/pariteEuro:pariteEuro;
		document.frm.montant.value=inttostr(strtoint(document.frm.montant.value)*coeff);
		return ongletClick(onglet);
	}
	return false;
}
function ongletClick(ong) {
	if (verifValeurs()) {
		l="index.php?client="+client+"&tpl="+template+"&ong="+ong+"&mnn="+monnaie;
		l+="&mnt="+strtoint(document.frm.montant.value)+"&txi="+strtofloat(document.frm.tauxInteret.value)+"&txa="+strtofloat(document.frm.tauxAssurance.value)+"&age="+(document.frm.age.value)+"&det="+(document.frm.detail.value);
		if ((onglet==1)||(onglet==9))
			l+="&dur="+document.frm.duree.options[document.frm.duree.selectedIndex].text+"&debm="+(document.frm.debutmois.selectedIndex+1)+"&deba="+(document.frm.debutannee.selectedIndex+(document.frm.currentyear.value-2));
		else
			l+="&dur="+document.frm.duree.value+"&debm="+document.frm.debutmois.value+"&deba="+document.frm.debutannee.value;
		location=l;
	}
	return false;
}
function verifValeurs() {
	var verifValeurs=0;
	if (((onglet==1)||(onglet==9))&&(strtoint(document.frm.montant.value)<=0))
		jalert("Veuillez indiquer le montant du prêt")
	else
		verifValeurs=1;
	return verifValeurs;
}
function calcClick() {
	if ((onglet==1)||(onglet==4))
		return ongletClick(2)
	else
		return ongletClick(onglet);
}
function dureeChange() {
	if (modifTauxInteret) {
		var d=document.frm.duree.options[document.frm.duree.selectedIndex].text;
		t=eval("document.frm.tauxInteret"+d+".value");
		document.frm.tauxInteret.value=floattostr(t);
	}
}
function ageChange() {
	document.frm.age.value=document.frm.ageSelect.selectedIndex;
	document.frm.tauxAssurance.value=document.frm.ageSelect.options[document.frm.ageSelect.selectedIndex].value;
}
function persoClick() {
 document.frm.perso.value=1-document.frm.perso.value;
 return ongletClick(document.frm.onglet.value);
}
function detailClick() {
 document.frm.detail.value=1-document.frm.detail.value;
 return ongletClick(onglet);
}

