<!--
	function hauteur_totale(){
		//afficher la hauteur totale de la page
		//pour firefox
		var height=document.documentElement.scrollHeight;
		//IE7+opera
		if(document.documentElement.clientHeight > height){
			height=document.documentElement.clientHeight;
		}
		//safari
		if(document.body.scrollHeight > height){
			height=document.body.scfrollHeight;
		}
		return height;
	}
	
	function largeur_totale(){
		//afficher la largeur totale de la page
		//pour firefox
		var width=document.documentElement.scrollWidth;
		//IE7+opera
		if(document.documentElement.clientWidth > width){
			width=document.documentElement.clientWidth;
		}
		//safari
		if(document.body.scrollWidth > width){
			width=document.body.scrollWidth;
		}
		return width;
	}
	
	function affiche_fenetre_opaque(){
		document.getElementById('global_fond').style.height=hauteur_totale()+'px';
		document.getElementById('global_fond').style.width=largeur_totale()+'px';
		document.getElementById('global_fond').style.visibility='visible';
		document.getElementById('global_contenu').style.visibility='visible';
		
		document.getElementById('global_contenu').style.top=objcentre('global_contenu')+'px';
	}
	
	function cache_opaque(){
		document.getElementById('global_fond').style.visibility='hidden';
		document.getElementById('global_contenu').style.visibility='hidden';
	}


	function objcentre(div_){
		var posy;
		var haut;
		var obj=document.getElementById(div_);
		var ieversion=0;
		//recherche si internet explorer
		if(navigator.appVersion.indexOf("MSIE")!=-1){
			var t=navigator.appVersion.split("MSIE");
			ieversion=parseFloat(t[1]);
		}
			if(ieversion==0){
				//Pour firefox
				posy=window.pageYOffset;
				haut=window.innerHeight;
			}
			else{
				//internet explorer
				posy=document.documentElement.scrollTop;
				haut=document.documentElement.clientHeight;
			}
			haut=(haut-obj.offsetHeight)/2;
			if(haut>0)
				posy=posy+haut;
			return posy;
	}
	
	function zoom_photo(valeur){
		affiche_fenetre_opaque();
		document.getElementById("global_contenu").innerHTML = '<img src="structure/preload.gif" style="box-shadow:0px 0px 0px #333333;" id="img_zoom"/>';
		var img = new Image();
		img.src=valeur;
		img.onload = function(){
			document.getElementById("global_contenu").innerHTML = '<div style="float:left;cursor:pointer" onclick="cache_opaque();"><p>[Fermer]</p></div><div style="clear:both;"><img src="'+valeur+'" id="img_zoom" /></div><br /><div style="float:right;cursor:pointer;" onclick="ajax_changement_photo(\'suiv\');">[Suivante]</div><div style="float:left;cursor:pointer;" onclick="ajax_changement_photo(\'prev\');">[Précédente]</div>';
			//alert(document.getElementById("img_zoom").width);
		}
	}
//-->
