// ---------------------------------------------------------------------//
// STOOBY_CMS                          						            //
// http://stooby-web.net                                                //
// ---------------------------------------------------------------------//
// STOOBY est un CMS (content management systeme) commercial!!!			//
// En aucun droit vous pouvez utiliser ces codes source. 				//
// Il appartient ŕ leurs auteurs respectif.          				    //
// ---------------------------------------------------------------------//

//Pour vérifier si y a du contenu dans un input...
function verifDonnee(idverif, idbox, mail, textarea)
{
	var content = document.getElementById(idverif).value;
	
	if(mail === true)
	{
		if(content == "" ){
		  document.getElementById(idverif).focus();
		  document.getElementById(idbox).style.background = 'url(images/input_no-valide.png) no-repeat';
	   }else if (!validEmail(content)) {
		  document.getElementById(idverif).focus();
		  document.getElementById(idverif).select();
		  document.getElementById(idbox).style.background = 'url(images/input_no-valide.png) no-repeat';
	   }else{
		  document.getElementById(idbox).style.background = 'url(images/input_valide.png) no-repeat';
	   }
	}
	else if(textarea === true)
	{
		if(content == "" )
		{
			document.getElementById(idverif).focus();
			document.getElementById(idbox).style.background = 'url(images/textarea_no-valide.png) no-repeat';
		}
		else
		{
			document.getElementById(idverif).focus();
			document.getElementById(idbox).style.background = 'url(images/textarea_valide.png) no-repeat';
		}
	}
	else
	{
		if(content == "" )
		{
			document.getElementById(idverif).focus();
			document.getElementById(idbox).style.background = 'url(images/input_no-valide.png) no-repeat';
		}
		else
		{
			document.getElementById(idverif).focus();
			document.getElementById(idbox).style.background = 'url(images/input_valide.png) no-repeat';
		}
	}
}