function imgOn(img)
	{
		document.getElementById(img).src="image/okk.png";
	}
function imgOff(img)
	{
		document.getElementById(img).src="image/pasok.png";
	}
function verifNomPrenom(champ,img)
	{
		text = document.getElementById(champ).value;
		if(checkCaractere(text)==true)
			{
				imgOn(img);
			}
		else
			{
				imgOff(img);
			}
	}
function verifChamp(champ,img)
	{
		text = document.getElementById(champ).value;
		if(text!="")
			{
				imgOn(img);
			}
		else
			{
				imgOff(img);
			}
	}
function verifCp(champ,img)
	{
		text = document.getElementById(champ).value;
		if(checkCp(text)==true)
			{
				imgOn(img);
			}
		else
			{
				imgOff(img);
			}
	}
	
function verifMail(champ,img)
	{
		text = document.getElementById(champ).value;
		if(checkMail(text)==true)
			{
				imgOn(img);
			}
		else
			{
				imgOff(img);
			}
	}
function checkCaractere(variable)
	{
		var nb = variable.length;
		var rec =/([0-9])/ 
		if(nb==0)
		{
			return false;
		}
		else
		{
			if(variable.match(rec))
				return false;
			else
				return true;
		}
	}	
	
function checkMail(mail)
	{
	if(mail == "")
		{
		return false;
		}
	else
		{
		if(mail.search(/ /)!='-1')
			{
			return false;
			}
		s = mail.split(/@/);
		if((s.length != 2) || s[0] == '' || s[1]==' ')
			{
			return false;
			}
		}
	return true;
	}
function checkCp(cp)
	{
		var nb = cp.length;
		var rec = /([0-9]){5}/
		if(nb == 0)
			{
				return false;
			}
		else
			{
				if(cp.match(rec))
					return true;
				else
					return false;
			}
	}
