
/*= Fonctions communes
------------------------ */

	/*Permet d’afficher un ID donné */
	function afficheID (myID) {
		setIdProperty (myID, "display", "block");
	}
	function masqueID (myID) {
		setIdProperty (myID, "display", "none");
	}
	/* Affiche ou masque un ID selon son état de départ */
	function swapAfffichageID (myID) {
		var state = getIdProperty(myID, "display");
		if (state == "none" || state == "") {
			setIdProperty (myID, "display", "block");
		} else {
			setIdProperty (myID, "display", "none");
		}
		
	}

/*= Attache des evenements au lien info 1
------------------------------------------- */
	
	/* Attache la fonction à l’élément "leg1" pemettant
	d’afficher-masquer des infos complémentaires à l’œuvre */
	function boiteInfo() {
		var boite = getElementById ("leg1");
		if (boite) {
			boite.onclick = function () {
				swapAfffichageID("infosOeuvre"); return false;
			}
		}
	}
	/* Attache la fonction de masquage à l’élément "closeInfos" */
	function closeInfos () {
		var close = getElementById ("closeInfos");
		if (close) {
			close.onclick = function () {
				masqueID("infosOeuvre"); return false;
			}
		}
	}


	/* Attache les fonctions aux objets */
	window.onload = function () {
		boiteInfo();
		closeInfos();
	}
