function fOpenVenster(sLocatie, bForm)
{
	
	window.open(sLocatie, 'sVenster', 'width='+screen.availWidth+',height='+screen.availHeight+',location=yes,status=yes,menubar=yes,directories=yes,toolbar=yes,resizable=yes,scrollbars=yes');
	
	if (bForm)
	{
		
		sLocatie.target = 'sVenster';
		
	}

}
	
function fOpenGrafischObject(sObject)
{
	
	if (document.getElementById('navigator'))
	{
		
		document.getElementById('navigator').style.visibility = 'hidden';
		
	}
	
	if (sObject.indexOf('swf') < 0)
	{

		var sEFoto = new Image();
		sEFoto.src = sObject;
	
	}
	
	var iBreedte = 640;
	var iHoogte = 0;

	var sAchtergrond = document.createElement('div');
	sAchtergrond.id = 'fotoachtergrond';
	
	sAchtergrond.style.visibility = 'visible';
	sAchtergrond.style.position = 'absolute';
	sAchtergrond.style.zIndex = 3;
	sAchtergrond.style.top = parseInt(document.documentElement.scrollTop)+'px';
	sAchtergrond.style.left = 0;
	sAchtergrond.style.width = '100%';
	sAchtergrond.style.height = '100%';
	
	var sElement = document.createElement('div');
	sElement.id = 'fotokader';
	
	sElement.style.visibility = 'visible';
	sElement.style.position = 'relative';
	sElement.style.zIndex = 4;
	sElement.style.left = '50%';
	sElement.style.top = parseInt(document.documentElement.scrollTop + 10)+'px';
	sElement.style.marginLeft = -(iBreedte / 1.8)+'px';
	sElement.style.padding = '40px';
	sElement.style.paddingTop = '20px';
	
	sElement.style.width = iBreedte+'px';
	sElement.style.background = '#000';
		
	sElement.innerHTML += '<a id="sluiten" href="#" onclick="javascript:document.getElementById(\'hoofd\').style.overflow = \'visible\';document.body.removeChild(document.getElementById(\'fotoachtergrond\'));document.body.removeChild(document.getElementById(\'fotokader\'));if (document.getElementById(\'navigator\') ? document.getElementById(\'navigator\').style.visibility = \'visible\' : \'\');return false;" title="Afbeelding sluiten">X</a><br />';
	
	if (sObject.indexOf('swf') < 0)
	{
		
		sElement.innerHTML += '<img src="'+sEFoto.src.replace('kl', 'gr')+'" alt="" />';
	
	}
	else
	{
	
		sElement.innerHTML += '<object id="video" type="application/x-shockwave-flash" data="http://video.google.com/googleplayer.swf?docId='+sObject.substring(0, sObject.indexOf('.swf'))+'&amp;hl=en"><param name="movie" value="http://video.google.com/googleplayer.swf?docId='+sObject.substring(0, sObject.indexOf('.swf'))+'&amp;hl=en" /><param name="wmode" value="transparent" />De vereiste Flash Plugin ontbreekt. Deze software kunt u <a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">gratis downloaden</a>.</p></object>';
		
	}

	document.body.appendChild(sElement);
	document.body.appendChild(sAchtergrond);
	
	if (sObject.indexOf('swf') < 0)
	{
	
		iHoogte = ((iBreedte * sEFoto.height) / sEFoto.width) + 70;

		if (document.body.clientHeight < iHoogte || window.innerHeight < iHoogte)
		{
		
			document.getElementById('fotoachtergrond').style.height = (iHoogte + 60)+'px';

		}
		
	}
	else
	{
		
		if (document.getElementById('video'))
		{
	
			var tVideo = setTimeout('fToonVideo()', 1000);
	
			if (document.getElementById('video').style.visibility == 'visible')
			{
				clearTimeout(tVideo);
	
			}
			
		}
		
	}
	
}

function fToonVideo()
{

	document.getElementById('video').style.visibility = 'visible';

}



