function IS_switch_champs(form,elem,elem2,longueur)
	{
	if(elem.value.length == 2)
		{
		eval('document.'+form+'.'+elem2+'.focus()');
		}
	}
	
function Is_selected_domaien1()
	{
	idDomaine1 = $("#domaine1").attr("value");
	$.post("includes/formulaire_candidature/candidature_domaine1.php",{domaine1:idDomaine1,provenance:'ajax'},function success(data)
		{
		$("#formation1").html(data);
		});
	}
function Is_selected_domaien2()
	{
	idDomaine2 = $("#domaine2").attr("value");
	$.post("includes/formulaire_candidature/candidature_domaine2.php",{domaine2:idDomaine2,provenance:'ajax'},function success(data)
		{
		$("#formation2").html(data);
		});
	}

function Is_selected_formation(formation)
	{
	idFormation = $("#formation"+formation).attr("value");
	$.post("includes/formulaire_candidature/candidature_formation"+formation+".php",{formationId:idFormation,numFormation:formation,provenance:'ajax'},function success(data)
		{
		$("#ville"+formation).html(data);
		});
	}
function Is_selected_langue(langue,div)
	{
	selection = $("#"+langue).attr("value");
	if(selection=='5')
		{
		$("#"+div).show();
		}
	else
		{
		$("#"+div).hide();
		}
	}
function Cache_Mention()
	{
	$("#divMentionBac").hide();
	}
function Affiche_Mention()
	{
	$("#divMentionBac").show();
	}
function Is_precedent(ecran)
	{
	var valeur = document.getElementById(ecran).value;
	switch(valeur)
		{
		case "2":
			document.getElementById(ecran).value=1;
		break;
		case "3":
			document.getElementById(ecran).value=2;
		break;
		case "4":
			document.getElementById(ecran).value=3;
		break;
		case "5":
			document.getElementById(ecran).value=4;
		break;
		case "7":
			document.getElementById(ecran).value=1;
		break;
		}
	}

function Is_click_domaine()
	{
	domaine=$("#domaineCourrier").val();
	if(domaine!=0)
		{
		$("#divVille_candidature").show();
		$.post("includes/formulaire_candidature/liste_ville.php",{idDomaine:domaine,provenance:'ajax'},function success(data)
			{
			$("#divVille_candidature").html(data); 
			});
		}
	else
		{
		$("#divVille_candidature").hide();
		$("#divFormation_candidature").hide();
		}
	}

function Show_bouton_valider()
	{
	$("#divSubmit").show();
	}