function openFotoDiv(divId, width, height, source) {
	var oGreyDiv = document.getElementById('grey');
	//gray overlay first
	//header height
	var scrolled  = GetScrollTop();
	var greyHeight = document.getElementById('banner_pic').offsetHeight;
	greyHeight += document.getElementById('bottomspacer').offsetHeight;
	greyHeight += document.getElementById('content').offsetHeight;
	greyHeight += document.getElementById('footer').offsetHeight;
	greyHeight += document.getElementById('topspacer').offsetHeight;
	greyHeight += 20;
	oGreyDiv.style.position = 'absolute';
	oGreyDiv.style.left = '0px';
	oGreyDiv.style.top = '0px';
	oGreyDiv.style.visibility = 'visible';
	oGreyDiv.style.width = '100%';
	oGreyDiv.style.height = greyHeight+'px';
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { 
		calculateLeft = (Math.round(document.body.clientWidth/2) - (width/2));
		calculateTop = (Math.round(document.body.clientHeight/2)-(height/2));
	} else {
		calculateLeft = (Math.round(window.innerWidth/2) - (width/2));
		calculateTop = (Math.round(window.innerHeight/2)-(height/2));
	}
	theDiv = document.getElementById(divId);
	
	theDiv.style.visibility = 'visible';
	theDiv.style.height 	= height+'px';
	theDiv.style.width 		= width+'px';
	//place the div
	theDiv.style.position = 'absolute';
	theDiv.style.top = (calculateTop+scrolled)+"px";
	theDiv.style.left = calculateLeft+"px";
	//fill the div
	theDiv.innerHTML 		= "<div align='center'><a href='javascript://' onclick=\"hideFotoDiv('"+divId+"')\"><img src='"+source+"' /></a></div>";
	
}

function hideFotoDiv(divId) {
	var oGreyDiv = document.getElementById('grey');
	var obigFoto = document.getElementById(divId);
	obigFoto.style.visibility = 'hidden';
	obigFoto.style.width = '0px';
	obigFoto.style.height = '0px';
	obigFoto.innerHTML = "";
	oGreyDiv.style.width = '0px';
	oGreyDiv.style.height = '0px';
	oGreyDiv.style.visibility = 'hidden';
}
