
function localFilename(url)	// removing path
{
	var x = url.lastIndexOf("/");
	url = url.slice(x + 1);
	return url;		
}
// images are loaded asynchronously with no delay


function enlarge(element)
{
	var name = element.src;
	
	name = localFilename(name);
	name = name.slice(6);   // remove the "thumb-" part
	name = "img/big/" + name;  // restore path and add the new "big-" prefix
		
	// building a string to display the image
	
	var str = "<div style=\"width:310px;height:310px;background:url('" + name + "') no-repeat 0px 0px;\"></div>";
	document.getElementById("photoenlarge").innerHTML = str;

}

