function ImagePopup(pImagePath, pStringClose, pImagesArray) {
	var oHider = document.createElement("div");
	var oCadre = document.createElement("div");
	var oImage = document.createElement("img");
	var oNext = document.createElement("img");
	var oPrevious = document.createElement("img");
	var oClose = document.createElement("div");
	var oArray = pImagesArray;
	var oImagePath = pImagePath;
	
	this.killPopup = function() {
		oCadre.removeChild(oImage);
		document.body.removeChild(oCadre);
		document.body.removeChild(oHider);
		document.body.removeChild(oClose);
		document.body.removeChild(oNext);
		document.body.removeChild(oPrevious);
	}
	
	this.hideScreen = function() {
		oHider.style.position = "absolute";
		oHider.style.top = "0";
		oHider.style.left = "0";
		oHider.style.width = "100%";
		oHider.style.height = document.body.scrollHeight + "px";
		oHider.style.backgroundColor = "#555";
		oHider.style.filter = "alpha(opacity=" + 70 + ")";
		oHider.style.opacity = 0.7;
		oHider.style.mozOpacity = 0.7;
		oHider.style.zIndex = 50000;
		oHider.style.cursor = "pointer";
		oHider.onclick = this.killPopup;
		
		document.body.appendChild(oHider);
	}
	
	this.showImage = function() {
		oCadre.style.position = "absolute";
		oCadre.style.padding = "10px";
		oCadre.style.backgroundColor = "#fff";
		oCadre.style.cursor = "pointer";
		oCadre.style.zIndex = 50001;
		oCadre.onclick = this.killPopup;
		
		oImage.src = pImagePath;
		oImage.style.height = "480px";
		oImage.style.width = "640px";
		oImage.style.cursor = "pointer";

		oCadre.appendChild(oImage);
		document.body.appendChild(oCadre);

		oClose.style.position = "absolute";
		oClose.style.zIndex = 50001;
		oClose.style.width = "200px";
		oClose.style.height = "25px";
		oClose.style.paddingTop = "5px";
		oClose.style.textAlign = "center";
		oClose.style.color = "#646567";
		oClose.style.backgroundColor = "white";
		oClose.style.top = ((document.documentElement.clientHeight - oCadre.offsetHeight) / 2) + 500 + "px";
		oClose.style.left = ((document.body.offsetWidth - oCadre.offsetWidth) / 2) + 460 + "px";
		oClose.innerHTML = pStringClose;
		oClose.style.cursor = "pointer";
		oClose.onclick = this.killPopup;

		document.body.appendChild(oClose);
		
		oNext.style.position = "absolute";
		oNext.style.zIndex = 50001;
		oNext.style.top = ((document.documentElement.clientHeight - oCadre.offsetHeight) / 2) + 250 + "px";
		oNext.style.left = ((document.body.offsetWidth - oCadre.offsetWidth) / 2) + 670 + "px";
		oNext.src = "./pages/images/realisations/fleche_droite.gif";
		oNext.style.cursor = "pointer";
		oNext.onclick = this.next;
		
		oPrevious.style.position = "absolute";
		oPrevious.style.zIndex = 50001;
		oPrevious.style.top = ((document.documentElement.clientHeight - oCadre.offsetHeight) / 2) + 250 + "px";
		oPrevious.style.left = ((document.body.offsetWidth - oCadre.offsetWidth) / 2) - 35 + "px";
		oPrevious.src = "./pages/images/realisations/fleche_gauche.gif";
		oPrevious.style.cursor = "pointer";
		oPrevious.onclick = this.previous;

		document.body.appendChild(oNext);
		document.body.appendChild(oPrevious);
		
		oCadre.style.top = ((document.documentElement.clientHeight - oCadre.offsetHeight) / 2) + "px";
		oCadre.style.left = ((document.body.offsetWidth - oCadre.offsetWidth) / 2) + "px";
	}
	
	this.next = bindFunction(function() {
		this.nextPrevious(1);
	}, this);
	
	this.previous = bindFunction(function() {
		this.nextPrevious(-1);
	}, this);
	
	this.nextPrevious = bindFunction(function(pNextPrevious) {
		var n = 0;
		for(var i = 0; i < oArray.length; i++) {
			if(oImage.src == oArray[i]) {
				n = i;
			}
		}
		n += pNextPrevious;
		if(n > oArray.length - 1) {
			n = 0;
		}
		if(n < 0) {
			n = oArray.length - 1;
		}
		oImage.src = oArray[n];
	}, this);

	this.hideScreen();
	this.showImage();
}