function fOpenVenster(sURL)
{

	window.open(sURL, 'sVenster', 'top=20,left=20,resizable=yes,scrollbars=yes,toolbar=yes');

}

function fMenu(item)
{

	if (document.getElementById)
	{

		this.obj = document.getElementById(item);
		this.style = document.getElementById(item).style;

	}
	else if (document.all)
	{
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers)
	{

		this.obj = document.layers[name];
		this.style = document.layers[name];
	}

}

function fToonMenu(item, aan)
{

	var i = new fMenu(item);

	i.style.display = (aan == 1) ? 'block' : 'none';

}

function fOpenVenster(sLocatie, bForm)
{
	
	window.open(sLocatie, 'sVenster', 'top=20,left=20,width='+(screen.width - 300)+',height='+(screen.height - 300)+',toolbar=yes,scrollbars=yes,resizable=yes');
	
	if (bForm)
	{
		
		sLocatie.target = 'sVenster';
		
	}

}


function fOpenFoto(sObject)
{
	
	//window.open('http://www.borcatering.nl/foto/'+sFoto+'/', 'sFoto', 'width=300,height=200,top=20,left=20,status=no,toolbar=no,resize=no,scrollbars=0,border=no');

	//document.getElementById('hoofd').style.overflow = 'hidden';
	
	var sEFoto = new Image();
	sEFoto.src = '/afbeeldingen'+sObject;

	var iBreedte = 600;
	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 += '<span class="fotolinks"><a id="sluiten" href="#" onclick="javascript:document.getElementById(\'hoofd\').style.overflow = \'visible\';document.body.removeChild(document.getElementById(\'fotoachtergrond\'));document.body.removeChild(document.getElementById(\'fotokader\'));return false;" title="Afbeelding sluiten">X</a></span><br />';
	sElement.innerHTML += '<img src="'+sEFoto.src.replace('kl', 'gr')+'" alt="" />';

	document.body.appendChild(sElement);
	document.body.appendChild(sAchtergrond);
	
	iHoogte = ((iBreedte * sEFoto.height) / sEFoto.width) + 70;

	if (document.body.clientHeight < iHoogte || window.innerHeight < iHoogte)
	{
	
		document.getElementById('fotoachtergrond').style.height = (iHoogte + 60)+'px';

	}
	
}

function fPasFormaatAan()
{
	
	//window.resizeBy(document.images[0].width - document.body.clientWidth, document.images[0].height - (document.body.clientHeight != 200 ? document.body.clientWidth / 1.5 : document.body.clientHeight));


	window.resizeBy(document.images[0].width - (document.body.clientWidth == 600 ? document.body.clientWidth / 2 : document.body.clientWidth), document.images[0].height - (document.images[0].height / 2.1));
	
}

function fGeefDienstWeerOfVerberg(checkbox, item)
{

	var i = new fMenu(item);	

	i.style.display = (checkbox ? 'block' : 'none');

}

function fPlaatsFlash()
{
	
	document.write('<object id="banner" type="application/x-shockwave-flash" data="/afbeeldingen/banner.swf"><param name="movie" value="/afbeeldingen/banner.swf" /><param name="wmode" value="transparent" /></object>');

}


