<!--//--><![CDATA[//>
<!--
/* pour apparition sous menu sous IE */
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

/* pour sommaire articles, formations */
sfHover = function() {
	if (document.getElementById("sommaire")!=null) { // test si sommaire existe sur la page
		var sfEls = document.getElementById("sommaire").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


/* realisations */
var layerPrefix='info';
var lienPrefix='lien';

function affiche(layer,lien){	
	
	for( i=0; i<total; i++) {		
		document.getElementById( layerPrefix + (i+1) ).style.display = 'none';
		/* on recupere l'etat du lien 'en savoir +' pour le laisser en italique si deja visité */
		var state = document.getElementById( lienPrefix + (i+1) ).className;
		if( state == 'aligndroite' ) {
			document.getElementById( lienPrefix + (i+1) ).className = 'aligndroite';
		} else {
			document.getElementById( lienPrefix + (i+1) ).className = 'aligndroitevisited';
		}
	}
	
	var state = document.getElementById(layer).style.display;
	if( state == 'block' ) {
		document.getElementById(layer).style.display = 'none';
	} else {
		document.getElementById(layer).style.display = 'block';
	}
	/* realisations : affiche/cache le lien en savoir plus */	
	var state = document.getElementById(lien).className;
	if( state == 'hide' ) {
		document.getElementById(lien).className = 'aligndroitevisited';
	} else {
		document.getElementById(lien).className = 'hide';
	}
	/* realisations : masque la boite recommander si elle est affichee */	
	var state = document.getElementById("recommander").style.display;
	if( state != 'none' ) {
		document.getElementById("recommander").style.display = 'none';
	}
}

function cache(layer,lien) {
	document.getElementById(layer).style.display="none";
	if(lien != "") {
		document.getElementById(lien).className = 'aligndroitevisited';
	}
}

/* pour afficher la boite recommandation */
function montre(id) {	  
	document.getElementById(id).style.display="block";
	document.getElementById("nom_recomand").focus();
	
	/* si on est sur la page des realisations, on masque les autres boites */
	if (document.getElementById("rea")!=null) {	
		for( i=0; i<total; i++) {		
			document.getElementById( layerPrefix + (i+1) ).style.display = 'none';
			/* on recupere l'etat du lien 'en savoir +' pour le laisser en italique si deja visité */
			var state = document.getElementById( lienPrefix + (i+1) ).className;
			if( state == 'aligndroite' ) {
				document.getElementById( lienPrefix + (i+1) ).className = 'aligndroite';
			} else {
				document.getElementById( lienPrefix + (i+1) ).className = 'aligndroitevisited';
			}
		}	
	}
	
}

/* formulaire de recommandation */
function recomand_Validator(theForm)
{
// test nom
 if (theForm.nom_recomand.value == "")
  {
    alert("Please give your name.");
	theForm.nom_recomand.style.borderColor = "#FE7639";
    theForm.nom_recomand.focus();
    return (false);
  }	
// verif mail ******************************************************
 if (theForm.email_recomand.value == "")
  {
    alert("Please give your e-mail address.");
	theForm.email_recomand.style.borderColor = "#FE7639";
    theForm.email_recomand.focus();
    return (false);
  }

// test adresse mail sur ŕ et .
  var checkemail = "@.";
  var checkStr = theForm.email_recomand.value;
  var emailValid = false;
  var emailAt = false;
  var emailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkemail.length;  j++)
    {
      if (ch == checkemail.charAt(j) && ch == "@")
        emailAt = true;
      if (ch == checkemail.charAt(j) && ch == ".")
        emailPeriod = true;
	  if (emailAt && emailPeriod)
		break;
	  if (j == checkemail.length)
		break;
	}
    if (emailAt && emailPeriod)
    {
		emailValid = true
		break;
	}
  }
  if (!emailValid)
  {
    alert("Please give a valid e-mail address.");
	theForm.email_recomand.style.borderColor = "#FE7639";
    theForm.email_recomand.focus();
    return (false);
  }

// verif mail destinataire ******************************************
 if (theForm.email_dest.value == "")
  {
    alert("Please give the e-mail address of your addressee.");
	theForm.email_dest.style.borderColor = "#FE7639";
    theForm.email_dest.focus();
    return (false);
  }

// test adresse mail sur ŕ et .
  var checkemail = "@.";
  var checkStr = theForm.email_dest.value;
  var emailValid = false;
  var emailAt = false;
  var emailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkemail.length;  j++)
    {
      if (ch == checkemail.charAt(j) && ch == "@")
        emailAt = true;
      if (ch == checkemail.charAt(j) && ch == ".")
        emailPeriod = true;
	  if (emailAt && emailPeriod)
		break;
	  if (j == checkemail.length)
		break;
	}
    if (emailAt && emailPeriod)
    {
		emailValid = true
		break;
	}
  }
  if (!emailValid)
  {
    alert("Please give a valid e-mail address for your addressee.");
	theForm.email_dest.style.borderColor = "#FE7639";
    theForm.email_dest.focus();
    return (false);
  }  

  
}

//--><!]]>