	var photo_container;	
	function showLargePhoto( e, url_photo, w_photo, h_photo, legende ){			
		//legende =  searchAndReplace( legende, "", "'" );		
		e = e || window.event;
		if( e.stopPropagation )
		e.stopPropagation();
		else
			e.cancelBubble = true;		
		var mx;
		var my;
		if( e.pageX ){
			mx = e.pageX ;
			my = e.pageY;
		}
		else{
			mx = e.clientX;
			my = e.clientY;
		}
		if( typeof( photo_container) == 'undefined' ){			
			photo_container = document.createElement('div');
			photo_container.style.position = 'fixed';
			photo_container.style.top = '0px';
			photo_container.style.left = '0px';
			photo_container.style.zIndex = 10;
			document.body.appendChild( photo_container );
		}
		strHTML = ''
		+'<img src="'+ url_photo +'" width="'+ w_photo +'" height ="'+ h_photo +'" onclick ="hideLargePhoto()" style="cursor:pointer" />'
		+'<p style="height:20px; font-family:arial; font-size:12px; text-align:center; line-height:20px; height:20px; background-color:#dedede; margin-top:0px">'+ legende +'</p>';
		photo_container.innerHTML = strHTML;
		photo_container.style.border = 'solid 10px #dedede';			
		photo_container.style.backgroundColor = '#dedede';
		photo_container.style.width = w_photo + 'px';
		photo_container.style.height = h_photo + 20 + 'px';
		photo_container.style.visibility = 'visible';		
	}
	
	function hideLargePhoto(){	
		if( typeof( photo_container ) == 'undefined' ) return;
		photo_container.style.visibility = 'hidden';
		photo_container.innerHTML = '';
	}
	
	function prevent( e ){
		e = e || window.event;
		if (e.preventDefault)
      		e.preventDefault();
		else
			e.returnValue = false;
	}
	
	function searchAndReplace( chaine, a_remplacer, remplacant ){			
		if( chaine.indexOf( a_remplacer ) != -1 ){	
			a_remplacer_debut = chaine.indexOf( a_remplacer ) ;
			a_remplacer_fin = chaine.indexOf( a_remplacer ) + a_remplacer.length;				
			nouvelle_chaine = chaine.substring( 0, a_remplacer_debut ) + remplacant + chaine.substring( a_remplacer_fin, chaine.length );			
			searchAndReplace( nouvelle_chaine, a_remplacer, remplacant );
		}
		else{			
			return chaine;
		}
	}
	
