		
		
	/* 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/2)-100, x = (width/2)-220;
		
		popupvenster = window.open(url,"venster","width="+breedte+",height="+hoogte+",toolbar=0,scrollbars=no,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)	{
		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)-100, x = (width/2)-220; // default values
		if((!window.grotefotovenster) || (grotefotovenster.closed))	{
			grotefotovenster = window.open("about:blank","fotovenster","width=450,height=450,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('update1("' + jpgnaam + '")',500)	
		}


		
	function update1(jpgnaam)	{
		grotefotovenster.document.theImage.src = "images/foto/" + jpgnaam + "_large.jpg"
		grotefotovenster.document.focus();
		}
		
		
		
	/* foto's leermiddelen tonen in popup */	
	
	function leerfotovergroten(jpgnaam)	{
		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)-100, x = (width/2)-220; // default values
		if((!window.grotefotovenster) || (grotefotovenster.closed))	{
			grotefotovenster = window.open("about:blank","fotovenster","width=450,height=450,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('leerupdate("' + jpgnaam + '")',500)	
		}


		
	function leerupdate(jpgnaam)	{
		grotefotovenster.document.theImage.src = "images/leermiddelen/" + jpgnaam + "_large.jpg"
		grotefotovenster.document.focus();
		}
		
		
		
		/* 3d versnellingsbak-fotos tonen in popup */	
	
	function foto3dvergroten(jpgnaam)	{
		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)-100, x = (width/2)-220; // default values
		if((!window.grotefotovenster) || (grotefotovenster.closed))	{
			grotefotovenster = window.open("about:blank","fotovenster","width=510,height=510,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('update3d("' + jpgnaam + '")',500)	
		}


		
	function update3d(jpgnaam)	{
		grotefotovenster.document.theImage.src = "images/3dfotos/" + jpgnaam + ".jpg"
		grotefotovenster.document.focus();
		}

		
		
	/* grote fotos tonen in popup voor motoren, cilinderkoppen en versnellingsbakken */	
	
	function fotogroot(jpgnaam)	{
		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)-100, x = (width/2)-220; // default values
		if((!window.grotefotovenster) || (grotefotovenster.closed))	{
			grotefotovenster = window.open("about:blank","fotovenster","width=600,height=450,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 update(jpgnaam)	{
		grotefotovenster.document.theImage.src = "images/foto/600x450/" + jpgnaam + ".JPG"
		grotefotovenster.document.focus();
		}
		
	
/* grote fotos tonen in popup voor reportages*/	
	
	function repofotovergroten(jpgnaam)	{
		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)-100, x = (width/2)-220; // default values
		if((!window.grotefotovenster) || (grotefotovenster.closed))	{
			grotefotovenster = window.open("about:blank","fotovenster","width=600,height=450,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('repoupdate("' + jpgnaam + '")',500)	
		}


		
	function repoupdate(jpgnaam)	{
		grotefotovenster.document.theImage.src = "images/fotoreportages/" + jpgnaam + ".jpg"
		grotefotovenster.document.focus();
		}



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

}


window.onunload=unloading;	
