
/* generieke popup functie	*/	
function popup(url,hoogte,breedte)	{
	var height, width;
	if (document.all)
	    height = document.body.offsetHeight, width = document.body.offsetWidth;
	else if (document.layers)
	    height = window.innerHeight, width = window.innerWidth;
		
	var y = (height/4)-0, x = (width/4)-0;
	
	popupvenster = window.open(url,"venster","width="+breedte+",height="+hoogte+",toolbar=0,scrollbars=yes,directories=0,status=0,menubar=0,location=0,resizable=0,top=" + y + ",screenY=" + y + ",left=" + x + ",screenX=" + x);

}

/* grote fotos tonen in popup */	
function fotovergroten(jpgnaam,fotobreedte,fotohoogte)	{
	var height, width;
	if (document.all)
	    height = document.body.offsetHeight, width = document.body.offsetWidth;
	else if (document.layers)
	    height = window.innerHeight, width = window.innerWidth;
	
	var y = (height/2)-200, x = (width/2)-200; // default values
	if((!window.grotefotovenster) || (grotefotovenster.closed))	{
		grotefotovenster = window.open("about:blank","fotovenster","width=" + fotobreedte + ",height=" + fotohoogte + ",toolbar=0,scrollbars=0,directories=0,status=0,menubar=0,location=0,resizable=0,top=" + y + ",screenY=" + y + ",left=" + x + ",screenX=" + x);
		}
	grotefotovenster.document.location.href = "foto.php";	
	setTimeout('update("' + jpgnaam + '")',500)	
}

function unloading() 
{
	if((window.grotefotovenster) && (!grotefotovenster.closed))	{
		grotefotovenster.close();
	}

}

window.onunload=unloading;	
	
function update(jpgnaam)	{
	
	grotefotovenster.document.theImage.src = "images/" + jpgnaam + ".jpg";
	grotefotovenster.focus();
	grotefotovenster.document.title = jpgnaam.toUpperCase();
}		


		