var blurDiv = false;

function showLightBox(boxID) {
	if (!blurDiv) {
		blurDiv = document.createElement('DIV');
		blurDiv.style.position = 'absolute';
		blurDiv.style.top = '0px';
		blurDiv.style.left = '0px';
		blurDiv.style.width = '100%';
		blurDiv.style.height = '100%';
		blurDiv.style.zIndex = '1000';
		blurDiv.style.backgroundColor = '#CECECE';
		blurDiv.className = 'blurdiv';
		document.body.appendChild(blurDiv);
	}
	blurDiv.style.display = 'block';
	
	var screenWidth = document.body.clientWidth;
	var screenHeight = document.body.clientHeight;

	var lightBoxBox = document.getElementById('lightbox_' + boxID);
	
	lightBoxBox.parentNode.removeChild(lightBoxBox);
	document.body.appendChild(lightBoxBox);
	
	lightBoxBox.style.position = 'absolute';
	lightBoxBox.style.left = ((screenWidth / 2) - 462) + 'px';
	lightBoxBox.style.top = document.body.clientHeight - document.body.scrollHeight + 100 + 'px';
	lightBoxBox.style.zIndex = '1001';
	lightBoxBox.style.display = 'block';
	

}
function closeLightBox(boxID) {
	blurDiv.style.display = 'none';
	
	var lightBoxBox = document.getElementById('lightbox_' + boxID);
	lightBoxBox.style.display = 'none';
}
function changeLightBoxImage(boxID,imageSrc) {
	var lightBoxBoxImage = document.getElementById('lightbox_bigimage_' + boxID);
	lightBoxBoxImage.src = imageSrc;
	
}
