function affichage(id){
	if(document.getElementById(id).style.display=="none"){
		document.getElementById(id).style.display="inline";
		if(document.getElementById("span_"+id).innerHTML=="[Afficher]")
			document.getElementById("span_"+id).innerHTML="[Masquer]";
		else
			document.getElementById("span_"+id).innerHTML="[Hide]";
	}else{
		document.getElementById(id).style.display="none";
		if(document.getElementById("span_"+id).innerHTML=="[Masquer]")
			document.getElementById("span_"+id).innerHTML="[Afficher]";
		else
			document.getElementById("span_"+id).innerHTML="[Show]";
	}	
}


/**
* fonction js gérant la page listant les artistes
*/
function changePhoto(dir,width,pays,name){
	document.getElementById("photo").innerHTML = "<br/><center><img src='images/pays/"+pays+".png' width='30px' />&nbsp;&nbsp;&nbsp;"+name+"</center><br/><img src='artistes/"+dir+"/bio.jpg' width='"+width+"' />";
}

function defaultPhoto(){
	document.getElementById("photo").innerHTML = "<br/><br/><img src='images/artistes.jpg' />";
}


function verifSuivie(){
	retour = true;

	if(document.formSuivie.personne.value==""){
		document.formSuivie.personne.style.backgroundColor="pink";
		document.getElementById("personne").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.personne.style.backgroundColor="#A0FF9B";
		document.getElementById("personne").innerHTML="";
	}
	
	if(document.formSuivie.nom.value==""){
		document.formSuivie.nom.style.backgroundColor="pink";
		document.getElementById("nom").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.nom.style.backgroundColor="#A0FF9B";
		document.getElementById("nom").innerHTML="";
	}
	
	if(document.formSuivie.ville.value==""){
		document.formSuivie.ville.style.backgroundColor="pink";
		document.getElementById("ville").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.ville.style.backgroundColor="#A0FF9B";
		document.getElementById("ville").innerHTML="";
	}
	
	if(document.formSuivie.rue.value==""){
		document.formSuivie.rue.style.backgroundColor="pink";
		document.getElementById("rue").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.rue.style.backgroundColor="#A0FF9B";
		document.getElementById("rue").innerHTML="";
	}
	
	if(document.formSuivie.pays.value==""){
		document.formSuivie.pays.style.backgroundColor="pink";
		document.getElementById("pays").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.pays.style.backgroundColor="#A0FF9B";
		document.getElementById("pays").innerHTML="";
	}
	
	if(document.formSuivie.postal.value==""){
		document.formSuivie.postal.style.backgroundColor="pink";
		document.getElementById("postal").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.postal.style.backgroundColor="#A0FF9B";
		document.getElementById("postal").innerHTML="";
	}
	
	if(document.formSuivie.tel.value==""){
		document.formSuivie.tel.style.backgroundColor="pink";
		document.getElementById("tel").innerHTML="Le champs doit être renseigné.";
		retour = false;
	}else{
		document.formSuivie.tel.style.backgroundColor="#A0FF9B";
	}
	
	if(!document.formSuivie.mail.value.match('^[-_.a-z]+@[-_.a-z]+\.[a-z]+$')){
		document.formSuivie.mail.style.backgroundColor="pink";
		document.getElementById("mail").innerHTML="L'adresse email est invalide.";
		retour = false;
	}else{
		document.formSuivie.mail.style.backgroundColor="#A0FF9B";
		document.getElementById("mail").innerHTML="";
	}
	
	
	return retour;
}

function changeColour(id){
	var elm = document.getElementById(id);
	
	if(elm.className=="tr_over"){
		if(id%2==0)
			elm.className="tr_grey";
		else
			elm.className="tr_white";
	}else{
		elm.className="tr_over";
	}
}

function download(file){
	window.location.replace(file);
}
