
function setCurrent(id)
{
	document.getElementById(id).background = "./images/current.png";	
}

function exitCurrent(id)
{
	document.getElementById(id).background = "";	
}

// Verander het plaatje voor de merkenpagina m.b.v. innerHTML fade
function doPicture(imagelink) {
	document.getElementById('merken_content_right').innerHTML = '<img style="display: none;" id="merk" src="' + imagelink + '" border="0" />';
	
	$(window).ready(function() {
		   $("#merk").fadeIn(2000);  
		 });
}

function isCurrentLink(linkid, linkname)
{
	var e=document.getElementsByName(linkname);

	for(var i=0;i<e.length;i++)
	{
	 	e[i].style.color = "#FFFFFF";
	}

	document.getElementById(linkid).style.color = "#9D681A";
}

function fadeimage(img) {
	var r = Math.random();
	r = r * 2000;
	
	setTimeout( function() {
		fadethis(img)
		}, r);
};

function fadethis(img)
{
	$(window).ready(function() {
		   $("#" + img).fadeIn(1000);  
		 });	
}

// Eerste plaatje fade op de homepage
function fadehomeimage(img)
{	
	setTimeout( function() {
		fadehomeimageafterdelay(img)
		}, 0);
}

function fadehomeimageafterdelay(img)
{
	$(document).ready(function(){	
		   $("#" + img).fadeIn(3500);  
		 });
}

function validate()
{
	if(document.getElementById('inputnaam').value == ""
	|| document.getElementById('inputbericht').value == "")
	{
		alert("De velden 'Naam' en 'Bericht' dienen te worden ingevuld!");
		
		return false;	
	}
	
	return true;
}

// Daarna onderstaande gebruiken
function undesat(img, orgimg) {
  	document.getElementById(img).style.display = "none";
  	document.getElementById(orgimg).style.display = "inline";
}

function desatdirty(img, orgimg) {
  	document.getElementById(img).style.display = "inline";
  	document.getElementById(orgimg).style.display = "none";
}

// Wordt alleen nog gebruikt bij het contactformulier
function desat(img) {
  Pixastic.process(document.getElementById(img), "desaturate");
}


