function setMenuStyle(This)
{
	$('li.menu').css( { "background-color" : "#ededed", "color" : "#000000", "font-weight" : "normal" } );
	$(This).css( { "background-color" : "#FF0000", "color" : "#FF0", "font-weight" : "bold" } );
}
function resetMenuStyle()
{
	$('li.menu').css( { "background-color" : "#ededed", "color" : "#000000", "font-weight" : "normal" } );
	$('li.menu#active').css( { "background-color" : "#FF0000", "color" : "#FF0", "font-weight" : "bold" } );
}

sponsorPosition = 0;
function sponsors()
{
	if( sponsorPosition >= _sponsors )
	{
		sponsorPosition = 0;
		$('#sponsorsHolder').css( { marginLeft : "-"+(sponsorPosition*212)+"px" } );
		setTimeout("sponsors()", 10);
	}
	else
	{
		$('#sponsorsHolder').animate( { marginLeft : "-"+(sponsorPosition*212)+"px" }, 500 );
		setTimeout("sponsors()", 3000);
	}
	
	sponsorPosition++;
}
sponsors();

bannerPosition = 0;
function banners()
{
	if( bannerPosition >= _banners )
	{
		bannerPosition = 0;
		$('#rotateBannerHolder').css( { marginLeft : "-"+(bannerPosition*784)+"px" } );
		setTimeout("banners()", 10);
	}
	else
	{
		$('#rotateBannerHolder').animate( { marginLeft : "-"+(bannerPosition*784)+"px" }, 1000 );
		setTimeout("banners()", 6500);
	}
	
	bannerPosition++;
}
banners();

function setNieuws(pagina)
{
	$('.nieuwsBerichtHolder').css( { display : "none" } );
	$('#nieuwsBerichtHolder-'+pagina).css( { display : "block" } );
	
	$('.nieuwsNavigatie').css( { color : "#FFF", "background-color" : "#3d3d3d" } );
	$('#nieuwsNavigatie-'+pagina).css( { color : "#FFF", "background-color" : "#FF0000" } );
}

fotoNummer = 1;
function showFoto(This,id)
{	
	fotoNummer = id;
	document.getElementById('groteFoto').src = document.getElementById("previewFoto-"+fotoNummer).src.replace("thumb_","");
	
	$('.previewFoto').css( { border : "1px solid #ffffff" } );
	$(This).css( { border : "1px solid #FF0000" } );
}

function changeFoto(side)
{
	if( side == 'right' )
	{
	}
	else
	{
		fotoNummer = parseInt(fotoNummer)+1;
			
		if(document.getElementById("previewFoto-"+fotoNummer).src != 'http:/#' && document.getElementById("previewFoto-"+fotoNummer).src != 'http://#' && document.getElementById("previewFoto-"+fotoNummer).src != 'http:///#')
		{
			document.getElementById('groteFoto').src = document.getElementById("previewFoto-"+fotoNummer).src.replace("thumb_","");
			$('.previewFoto').css( { border : "1px solid #ffffff" } );
			$('#previewFoto-'+fotoNummer).css( { border : "1px solid #FF0000" } );
		}
		else
		{
			fotoNummer = parseInt(fotoNummer)-1;
		}
	}
}

function verzendContact()
{
	var Handler	= null;
	var Fields	= new Array('naam','email','onderwerp');
	var Errors	= 0;

	for ( var i = 0; i < Fields.length; i++ )
	{
		if ( document.getElementById(Fields[i]).value == '' )
		{
			document.getElementById(Fields[i]).style.border = '1px solid #BA1C1C';
			Errors++;
		}
		else
		{
			document.getElementById(Fields[i]).style.border = '1px solid #999';
		}
	} 

	if ( Errors == 0 )
	{
		document.forms['contactForm'].submit();	
	}

	if ( Errors > 0 )
	{
		alert('U heeft niet alle verplichte velden ingevuld. \nDe onvolledige velden zijn gemarkeerd met een rode rand.');
	}
}

function geeltjeClose()
{
	$('#geeltje').animate( { marginTop : "300px", marginLeft : "350px", opacity : "0.0" }, 800 );
}
