/* Fonction qui décrypte une adresse mail cryptée
 * par la fonction équivalente en php
 *
 * @author 			Alexandre BRY - Alyweb
 * @param 	email	Email à décrypter
 * @param	mailto	'ajout de mailto:' (pour envoi direct)`
 * @return 	string	Chaine avec l'adresse
 */
function decrypt_email(email, mailto) {
  temp = email.replace(/\[@\]/,"@");
  email = temp.replace(/\[.\]/g,".");

  if (mailto == 0 || mailto == undefined) {
    document.write(email);
  }else {
    location.href = "mailto:"+email;
  }
}

function fermerSousMenu() {

	for (i=0; i<20; i++) {
		masquer('ssmenu-'+i);
	}
}


/* Fonction qui masque un élément de la page
 *
 * @author 			Alexandre BRY - Alyweb
 * @param 	obj		Identifiant de l'objet
 * @return 	null
 */
function masquer(obj) {
  if (document.getElementById(obj)) {
    document.getElementById(obj).style.display = "none";
  }
}

/* Fonction qui affiche un élément de la page
 *
 * @author 			Alexandre BRY - Alyweb
 * @param 	obj		Identifiant de l'objet
 * @return 	null
 */
function afficher(obj) {
  if (document.getElementById) {
    document.getElementById(obj).style.display="block";
  }
}

