
// ================================================ SURVOL BTN GALERIE
	function survol()
	{
		document.getElementById("lienGaleriePhotosImg").className="translucide";
		document.getElementById("lienGaleriePhotos2").className="translucide2";
	}
	
	function finSurvol()
	{
		document.getElementById("lienGaleriePhotosImg").className="opaque";
		document.getElementById("lienGaleriePhotos2").className="opaque";
	}
// ================================================ SURVOL BTN GALERIE

// ================================================ AFFICHAGE DES FLASH
	function afficheFlash(version,nom,largeur,hauteur){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+',0,0,0" width='+largeur+' height='+hauteur+'>\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="movie" value='+nom+' />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write('<embed src='+nom+' quality="high" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width='+largeur+' height='+hauteur+'></embed>\n');
		document.write('</object>\n');
	}
// ================================================ AFFICHAGE DES FLASH

// ================================================ SURVOL LISTE ALBUMS
	function survolVignetteOn(album)
	{
		album.style.backgroundColor = "#eedeb9";
	}
	
	function survolVignetteOff(album)
	{
		album.style.backgroundColor = "#fff";
	}
// ================================================ SURVOL LISTE ALBUMS

// ================================================ SURVOL VIGNETTES ALBUMS
	function survolVignetteOn2(album)
	{
		album.style.backgroundColor = "#eedeb9";
		album.style.border = "1px solid #093556";
	}
	
	function survolVignetteOff2(album)
	{
		album.style.backgroundColor = "#fff";
		album.style.border = "1px solid #c8c8c8";
	}
// ================================================ SURVOL VIGNETTES ALBUMS

function  afficheZoom(img)
{
	
	document.getElementById('zoomzoom').src=img;
}

// ================================================ CENTRAGE VERTICALE PAGE INDEX

function centrageVertical()
	{
		hauteurPage = document.getElementById("repere").offsetTop + 1;
		hauteurContenu = 686;
		
		if(hauteurPage > hauteurContenu)
		{
			difference = hauteurPage - hauteurContenu;
			document.body.style.paddingTop = (difference/2) +"px";
		}
		else
		{
			document.body.style.paddingTop = 0;
		}
	}
	
	function centrageVertical2()
	{
		hauteurPage = document.getElementById("repere").offsetTop + 1;
		hauteurContenu = 686;
		
		if(hauteurPage > hauteurContenu)
		{
			difference = hauteurPage - hauteurContenu;
			document.body.style.paddingTop = (difference/2) +"px";
		}
		else
		{
			document.body.style.paddingTop = 0;
		}
	}

// ================================================ CENTRAGE VERTICALE PAGE INDEX

// ================================================ ANIMATION FONDU PHOTOS GALERIE
	var Animation = function(imageAnimee)
	{
		this.nomImage=imageAnimee; // nom de l'image pour faire l'animation
		this.listeImage=new Array; // liste des images pour chaque anime
		this.interval=0; 
		this.j=0; // variable utilisée pour indiquer le rang de l'image en cours
		
		this.ajoutImage = function(nomVisuel) // fonction permettant d'ajouter une image dans la liste
		{
			this.listeImage.push(nomVisuel);
		}
		
		this.ajoutVitesse = function(valeurVitesse) // fonction permettant d'indiquer la vitesse de défilement
		{
			this.vitesse = valeurVitesse;
		}
		
		this.ajoutDuree = function(valeurDuree) // fonction permettant d'indiquer la durée du fadding
		{
			this.duree = valeurDuree;
		}
		
		this.runSlide = function() // fonction pour l'animation
		{
			if (document.all)
			{
				
				if(navigator.userAgent.indexOf("Opera")!=-1)
				{
					
				}
				else
				{
					document.getElementById(this.nomImage).style.filter="blendTrans(duration=2)" // indication du filtre à utiliser pour le fading des images
					document.getElementById(this.nomImage).style.filter="blendTrans(duration=this.duree)"
					document.getElementById(this.nomImage).filters.blendTrans.Apply()
				}
			}
			var p = this.listeImage.length; // variable indiquant le nombre d'images de l'anime
			
			document.getElementById(this.nomImage).src = this.listeImage[this.j]; // indique le nom de l'image
			if (document.all)
			{
				if(navigator.userAgent.indexOf("Opera")!=-1)
				{
					
				}
				else
				{
					document.getElementById(this.nomImage).filters.blendTrans.Play() // actionne le filtre pour l'image
				}
			}
			this.j++; // incrémente le rang de l'image en cours (pour passer à la suivante
			if (this.j > (p-1)) this.j=0 // si le rang de l'image en cours est supérieure au nombre d'images de l'anime on retourne à la première image
			
			var thisObj = this; // permet de récupérer le nom de l'occurence de l'objet
			this.interval = setTimeout(function(){ thisObj.runSlide() }, this.vitesse) // permet de changer l'image en fonctin de la vitesse choisie 
		}
		
		this.stopSlide = function() // permet de stopper le défilement des images (sur un évènement onclick, onmouseover par exemple)
		{
			clearTimeout(this.interval);
		}
	}
// ================================================ ANIMATION FONDU PHOTOS GALERIE
	
// ================================================ CONTROLE FORMULAIRE
	function validationForm(monform)
	{
		
		var reg_email = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;
		
		if (monform.nom.value=='')
		{
			alert("Veuillez indiquer votre nom");
			monform.nom.focus();
			return false;
		}
		
		if (monform.prenom.value=='')
		{
			alert("Veuillez indiquer votre prénom");
			monform.prenom.focus();
			return false;
		}

		if (monform.email.value=='')
		{
			alert("Veuillez indiquer votre adresse email");
			monform.email.focus();
			return false;
		}
		
		if(!reg_email.test(monform.email.value))
		{
			alert("Le format de votre adresse email est incorrect");
			monform.email.focus();
			return false;
		}
		
		if (monform.etablissement.value=='')
		{
			alert("Veuillez sélectionner l'établissement à contacter");
			monform.etablissement.focus();
			return false;
		}
		
		if (monform.message.value=='')
		{
			alert("Veuillez indiquer votre message");
			monform.message.focus();
			return false;
		}
		
		return true;
	}
// ================================================ CONTROLE FORMULAIRE
