function openLightbox(element)
{
	var image = new Image;
	var image = document.createElement("img");
	image.src = element.src.replace("-small", "");
	
	if(window.innerHeight <= 650)
	{
		image.style.height = window.innerHeight*0.80+"px";
		image.style.marginLeft = -431*(window.innerHeight*0.80*100/607)/100/2+10+"px";
	}
	else
	{
		image.style.marginLeft = "-225.50px";
	}
	
	$("lightbox").innerHTML = "";
	$("lightbox").appendChild(image);
	$("mask").appear({ duration: 1, from: 0, to: 0.60 });
	$("lightbox").style.display = "block";
	
}

function closeLightbox()
{
	$("lightbox").style.display = "none";
	$("mask").style.display = "none";
}


function screenSize() 
{
	if(typeof(window.innerHeight && window.innerWidth) == "number" && (window.innerHeight && window.innerWidth) != 0)
	{
		if(window.innerHeight < 240 || window.innerWidth < 240)
		{
			screenHeight = 210;														// Fixed minimum album height excluding margins
			screenWidth = 240;														// Fixed minimum album width
		}
		else
		{
			screenHeight = window.innerHeight - 30;									// Substraction of a top and bottom margin of 15px each
			screenWidth = window.innerWidth;
		}
	}
	else if(typeof(document.documentElement.clientHeight && document.documentElement.clientWidth) == "number" && (document.documentElement.clientHeight && document.documentElement.clientWidth) != 0)
	{
		if(document.documentElement.clientHeight < 240 || document.documentElement.clientWidth < 240)
		{
			screenHeight = 210;														// Fixed minimum album height excluding margins
			screenWidth = 240;														// Fixed minimum album width
		}
		else
		{
			screenHeight = document.documentElement.clientHeight - 30;				// Substraction of a top and bottom margin of 15px each
			screenWidth = document.documentElement.clientWidth;
		}
	}
	else
	{
		window.alert("We couldn't detect your window size. There for the album couldn't be loaded.");
	}
	return screenHeight;
	return screenWidth;
}
