/**
 * Affiche ou masque les icones d'édition des photos de stade
 * @param id Identifiant de l'élément HTML
 */
function show_hide(id)
{
	if(document.getElementById(id).style.display == "none")
		document.getElementById(id).style.display = "";
	else
		document.getElementById(id).style.display = "none";
}

/**
 * Demande de confirmation pour la suppression d'une photo
 * @return true ou false
 */
function confirmPhotoSupp()
{
	if(confirm("Confirmez la suppression de cette photo ?"))
		return true;
	else 
		return false;
}

/**
 * Met en avant la photo affiché actuellement
 * @param id_photo Id de la photo affiché
 */
function highlightPhoto(id_photo)
{
	var maListe = document.getElementById("photo_mini");
	
	for (i=0; i < maListe.childNodes.length; i++)
	{
		if(maListe.childNodes[i].nodeName == "LI")
		{
			if(id_photo == maListe.childNodes[i].id)
				document.getElementById(maListe.childNodes[i].id).className = "photo_mini_li photo_mini_li_affiche";
			else
				document.getElementById(maListe.childNodes[i].id).className = "photo_mini_li";
		}
	}
}

/**
 * Met en avant l'album affiché actuellement
 * @param id_photo Id de l'album affiché
 */
function highlightAlbum(id_album)
{
	var maListe = document.getElementById("album_liste");
	var un_bool = false;
	
	for (i=0; i < maListe.childNodes.length; i++)
	{
		if(maListe.childNodes[i].nodeName == "LI")
		{
			if(id_album == maListe.childNodes[i].id)
			{
				un_bool = true;
				document.getElementById(maListe.childNodes[i].id).className = "album_courant";
			}
			else
				document.getElementById(maListe.childNodes[i].id).className = "";
		}
	}
	
	if(un_bool == true)
		document.getElementById('album_li_affiche0').className = "";
	else
		document.getElementById('album_li_affiche0').className = "album_courant";
}

/**
* Affiche le message de chargement
* @param id Identifiant du div
*/
function affiche_loading(id)
{
	if(e = document.getElementById(id))
		e.style.visibility = 'visible';
}

/**
* Masque le message de chargement
* @param id Identifiant du div
*/
function masque_loading(id)
{
	if(e = document.getElementById(id))
		e.style.visibility = 'hidden';
}

