function getElement (id)
{
  if (!document.getElementById)
    return;

  return document.getElementById (id)
}

function DisplayS (id)
{
  getElement(id).style.display = (getElement(id).style.display == "none" ? "" : "none");
}

function toggle (id, id2, id3)
{
  DisplayS (id);
  DisplayS (id2);
  DisplayS (id3);
}

var currentDiv = "";

function clic(target)
{
	getElement("moncadreA").style.display = "none";
	getElement("moncadreB").style.display = "none";
	getElement("moncadreC").style.display = "none";
	getElement("moncadreD").style.display = "none";
	if(currentDiv!="")
		getElement(currentDiv).style.display = "none";
    getElement(target).style.display = "inline";
	currentDiv = target;
}

function accueil()
{
	getElement(currentDiv).style.display = "none";
	getElement("moncadreA").style.display = "inline";
	getElement("moncadreB").style.display = "inline";
	getElement("moncadreC").style.display = "inline";
	getElement("moncadreD").style.display = "inline";
}

function formationInitiale()
{
	getElement(currentDiv).style.display = "none";
	getElement("cadreFormationIni").style.display = "inline";
}

function formationComplementaire()
{
	getElement(currentDiv).style.display = "none";
	getElement("cadreFormationCom").style.display = "inline";

}

function particuliers()
{
	getElement(currentDiv).style.display = "none";
	getElement("cadreParticuliers").style.display = "inline";

}

function professionnels()
{
	getElement(currentDiv).style.display = "none";
	getElement("cadreProfessionnels").style.display = "inline";

}

var currentSousDiv = "";

function onover(sousDiv)
{
	//alert('coucou');
	if(currentSousDiv != "")
		getElement(currentSousDiv).style.display = "none";
	getElement(sousDiv).style.display = "inline";
	currentSousDiv = sousDiv;
}

// DIV PARTICULIERS : 
var currentSousDivParticulier = "";

function onoverPar(sousDiv)
{
	if(currentSousDivParticulier != "")
		getElement(currentSousDivParticulier).style.display = "none";
	getElement(sousDiv).style.display = "inline";
	currentSousDivParticulier = sousDiv;
}


// Verification formulaire
function VerifForm(formulaire)
{
// Nom : 
nom = formulaire.nom.value;
if (nom.length<1){alert('Vous devez remplir votre nom !'); return(false);}
// Message : 
message = formulaire.message.value;
if (message.length<1){alert('Vous avez oublie de saisir votre message !'); return(false);}
// Adresse email : 
adresse = formulaire.email.value;
var place = adresse.indexOf("@",1);
var point = adresse.indexOf(".",place+1);
if ((place > -1)&&(adresse.length >2)&&(point > 1))
	{
	formulaire.submit();
	return(true);
	}
else
	{
	alert('Entrez une adresse e-mail valide !');
	return(false);
	}
}