function verify(form) 
{
	form = document.getElementById(form);
	var fout = 0;

	if(form.validatiecode.value == "" || form.validatiecode.value.length > 4) { form.validatiecode.style.background = '#FFEEEE'; fout = 3; }
	else { form.validatiecode.style.background = '#FFFFFF'; }

	if(form.naam.value == "") { form.naam.style.background = '#FFEEEE'; fout = 1; }
	else { form.naam.style.background = '#FFFFFF'; }

	//if( form.email.value == "" || form.email.value.indexOf('@') == -1 || form.email.value.indexOf('.') == -1 ) { form.email.style.background = '#FFEEEE'; if(fout == 0) fout = 2; }
	//else { form.email.style.background = '#FFFFFF'; }

	if(form.reactie.value == "") { form.reactie.style.background = '#FFEEEE'; fout = 1; }
	else { form.reactie.style.background = '#FFFFFF'; }

	

	if(fout == 1)
	{
		alert('Niet alle velden zijn correct ingevuld.');
		return;
	}

	if(fout == 2)
	{
		alert('Geen geldig e-mail adres ingevuld.');
		return;
	}

	if(fout == 3)
	{
		alert('Geen geldig code ingegeven');
		return;
	}

	if(fout == 0){
		//document.gbformulier.submit();
		//document.forms['gbformulier'].submit();
		contactFormulier = "contactFormulier";
		document.getElementById(contactFormulier).submit();
		var formToSend = document.getElementById("contactFormulier");
		formToSend.submit();
	}
}

function insertSmiley(to,from)
{
	document.getElementById(to).value += from + "";
	document.getElementById(to).focus();
}

function textStyle(to,from)
{
	document.getElementById(to).value += from;
	document.getElementById(to).focus();
}

function maximizeArea(to)
{
	if(document.getElementById(to).rows+5 > 25)
	{
		alert('Maximum of 25 rows reached');
		document.getElementById(to).rows = 25;
	}
	else
	{
		document.getElementById(to).rows += 5;
	}
}

function minimizeArea(to)
{
		
	if(document.getElementById(to).rows-5 < 5)
	{
		alert('Minimum of 5 row reached');
		document.getElementById(to).rows = 5;
	}
	else
	{
		document.getElementById(to).rows -= 5;
	}
}