function galerie(image) {
	image = '<div id="image_galerie"><img src="'+image+'" width=500px;></div><div  class="image_droite"  style="border:0; margin-top:10px" id="fermer"><img src="images/fermer.gif"></div>'; 
	popup_html(image);
}
function getViewSize() { //// renvoie taille de la zone d'affichage
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	  }
	  /// pr enlever espace occupé par scrollbars
	  if(typeof(window.innerHeight) == 'number'){
		 if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ){
			myWidth=myWidth-Math.max((window.innerWidth - document.documentElement.clientWidth),0);
			myHeight=myHeight-Math.max((window.innerHeight - document.documentElement.clientHeight),0);
		}
		/*else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ){
			myWidth=myWidth-(window.innerWidth - document.body.clientWidth);
			myHeight=myHeight-(window.innerHeight - document.body.clientHeight);
		 }*/
	  }  
	   return [ myWidth, myHeight ];
}
function getScrollXY() {
	  var scrOfX = 0, scrOfY = 0;
	  if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	  }
	  return [ scrOfX, scrOfY ];
	}
	function initPositionDiv(elem){
	var tab = new Array();
	tab = getScrollXY();
	elem.style.top=tab[1]+'px';
	elem.style.left=tab[0]+'px';
	elem.style.height=getViewSize()[1]+'px';
	window.setTimeout(function(){initPositionDiv(elem)}, 10);
}

function popup_html(affichage)
{
var affichage = affichage;
var newDiv=document.createElement("div");
var opa=0.5;
newDiv.style.position="absolute";
newDiv.style.zIndex=100;
initPositionDiv(newDiv);
newDiv.style.width='100%';
newDiv.style.backgroundColor='#000000';
newDiv.style.opacity=opa;
newDiv.style.filter = "alpha(opacity=" + (opa*100) + ")"; /// pr IE
document.body.appendChild(newDiv);

var newDiv2=document.createElement("div");
newDiv2.style.position="absolute";
newDiv2.style.zIndex=200;
newDiv2.style.textAlign='left';
newDiv2.style.width='500px';
newDiv2.style.top='1px';
newDiv2.style.border='10px solid white';
newDiv2.style.backgroundColor='#ffffff';


newDiv2.style.marginLeft='-'+Math.round((300)/2)+'px';
newDiv2.style.left='50%';
newDiv2.innerHTML = affichage; 
document.body.appendChild(newDiv2);
var temp=getViewSize()[1]-newDiv2.offsetHeight;
	//if(temp>0){newDiv2.style.top=getScrollXY()[1]+(temp/2)+'px';}
	//else{newDiv2.style.top=getScrollXY()[1]+'px';}
	newDiv2.style.top=getScrollXY()[1]+100+'px';
			document.getElementById("fermer").onclick=function(){
			closeDiv(newDiv, newDiv2);
	}

}
function closeDiv(elem, elem2){
	document.body.removeChild(elem);
	document.body.removeChild(elem2);
}

