avant = new Array();
negatif_nb = new Array();
function verif_nombrepm(id)
{
	if(isNaN(document.getElementById(id).value)!=false)
	{
		document.getElementById(id).value=parseInt(avant[id]);
	}
	avant[id] = document.getElementById(id).value;
	document.getElementById(id).value=parseInt(avant[id]);
	if(isNaN(avant[id]) || avant[id] == NaN || isNaN(document.getElementById(id).value) || document.getElementById(id).value == NaN)
	{
		avant[id] = 1;
		document.getElementById(id).value=1;
	}
	if(avant[id]<0 && negatif_nb[id]=='0')
	{
		avant[id] = 0;
		document.getElementById(id).value=0;
	}
//	exit;
	return true;
}
function plmn(id,pm)
{
	if(pm == 'm')
	{
		document.getElementById(id).value-=1;
	}
	else
	{
		document.getElementById(id).value=parseInt(document.getElementById(id).value)+1;
	}
	verif_nombrepm(id);
}
