function ContentVerif(liste,Tab) {
msg="";
Erreur="";

for (Val in Tab){
infosTest=Tab[Val]

// categorie (value ,tinymce par exemple), nom balise, lib texte
typeCateg=infosTest[0]
IdBalise=infosTest[1]

	switch (typeCateg)
	{
	case "text":
		//if (document.forms[liste].titre.value=="") {
		
		if (liste[IdBalise].value=="") {
			msg=msg+"<span class=\"erreur\">Veuillez saisir "+infosTest[2]+".</span><br>";
			document.getElementById(IdBalise).style.backgroundColor='#e95b30'	
			Erreur="ok";
		} else {
			document.getElementById(IdBalise).style.backgroundColor='white'	
			}
		break;
	case "tiny":
	//http://tinymce.moxiecode.com/punbb/viewtopic.php?id=9983  peut etre a modifier selon les versoins utilisées
		var editorInstance = tinyMCE.getInstanceById(IdBalise);
		if (editorInstance.getHTML()=="") {
		msg=msg+"<span class=\"erreur\">Veuillez saisir "+infosTest[2]+".</span><br>";
		tinyMCE.getInstanceById(IdBalise).getWin().document.body.style.backgroundColor='#e95b30';
//			document.getElementById(IdBalise).style.backgroundColor='yellow'	
			Erreur="ok";
		} else {
		tinyMCE.getInstanceById(IdBalise).getWin().document.body.style.backgroundColor='white'	
		}
		
	break;
	case "mail":
        var modele = new RegExp('^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,6}$', 'i');
        if (!modele.test(liste[IdBalise].value)) {
		msg=msg+"<span class=\"erreur\">"+infosTest[2]+"</span><br>";
          document.getElementById(IdBalise).style.backgroundColor='#e95b30'	
			Erreur="ok";
        } else {
			document.getElementById(IdBalise).style.backgroundColor='white'	
		}
	break;
		
	case "dble_pass":
		TmpChamp=IdBalise.split('|');
		champs1=TmpChamp[0];
		champs2=TmpChamp[1];
		if (liste[champs1].value!="")  {// vérifie que 1er champs pas vide avant de faire le test
			if (liste[champs1].value==liste[champs2].value) {
				document.getElementById(champs1).style.backgroundColor='white'	
				document.getElementById(champs2).style.backgroundColor='white'	
			} else {
			msg=msg+"<span class=\"erreur\">Veuillez saisir "+infosTest[2]+".</span><br>";
				document.getElementById(champs1).style.backgroundColor='#e95b30'	
				document.getElementById(champs2).style.backgroundColor='#e95b30'	
				Erreur="ok";
			}
		}
	break;
	
	case "selectExcluLigne1":
	
	//alert(liste[IdBalise].options.selectedIndex)
		if (liste[IdBalise].options.selectedIndex==-1||(liste[IdBalise].options.selectedIndex==0)) {
			msg=msg+"<span class=\"erreur\">Veuillez choisir "+infosTest[2]+".</span><br>";
			document.getElementById(IdBalise).style.backgroundColor='#e95b30'	
			Erreur="ok";
		} else {
			document.getElementById(IdBalise).style.backgroundColor='white'	
		}
			
	break;
	
	case "select":
	
	//alert(liste[IdBalise].options.selectedIndex)
		if (liste[IdBalise].options.selectedIndex==-1) {
			msg=msg+"<span class=\"erreur\">Veuillez choisir "+infosTest[2]+".</span><br>";
			document.getElementById(IdBalise).style.backgroundColor='#e95b30'	
			Erreur="ok";
		} else {
			document.getElementById(IdBalise).style.backgroundColor='white'	
		}
			
	break;
	
	case "catchall":
	   chaine=liste[IdBalise].value
	   if (chaine=="") {
		   	msg=msg+"<span class=\"erreur\">Veuillez saisir une réponse à la question.</span><br>";
			document.getElementById(IdBalise).style.backgroundColor='#e95b30'	
			Erreur="ok";
	   } else {
		   
			chaine=chaine.toUpperCase()		    
			if (chaine.indexOf("TERRE")==-1) {
				msg=msg+"<span class=\"erreur\">Votre réponse est erronée.</span><br>";
				document.getElementById(IdBalise).style.backgroundColor='#e95b30'	
				Erreur="ok";
			} else {
				document.getElementById(IdBalise).style.backgroundColor='white'	
			}
		}
		break;
	
	case "phone":	
		
		var modele = new RegExp('^[0-9]{2}([ ])[0-9]{2}([ ])[0-9]{2}([ ])[0-9]{2}([ ])[0-9]{2}$');
        if (!modele.test(liste[IdBalise].value)||!liste[IdBalise].length==14) {
		msg=msg+"<span class=\"erreur\">Veuillez saisir "+infosTest[2]+".</span><br>";
	        document.getElementById(IdBalise).style.background = '#e95b30';
			Erreur="ok";
	    } else {
			document.getElementById(IdBalise).style.backgroundColor='white'	
		}
    
		break;

	
	default: 
		msg=msg+"<span class=\"erreur\">Catégorie "+typeCateg+" inexistante.</span><br>";
		Erreur="ok";
	} 
}

document.getElementById("moncalque").innerHTML=msg;
if (Erreur!="ok") {liste.submit()};
}
