﻿// Function clean: 
// When a field is left empty, the message 'Vul uw .... ' will appear in the field
// When the user enters a field containing this sentence, the field will be empties


// Function valq: 
// Script that validates the fields before sending

function clean(what) 
{
	var content=document.getElementById(what).value.substr(0,6);
	if (content=="Please") 
	{ 
	document.getElementById(what).value="";
	document.getElementById(what).style.color="black";
	//document.all.check_radio.innerHTML="";
	}
}

function valq(form)
	{
		// Overall variable contains validation value
		var ok = true;


		// Check all different input values
		
		if ((document.form.name.value=="")||(document.form.name.value=="Please fill in your name")) 
		{
		document.form.name.style.color="red";
		document.form.name.value="Please fill in your name";			
		ok=false;
		}
		
		if ((document.form.phone.value=="") ||(document.form.phone.value=="Please fill in your telephone number")) 
		{ 
		document.form.phone.style.color="red";
		document.form.phone.value="Please fill in your telephone number";
		
		ok=false;
		}
		
	
		
		if (ok)	form.submit();

		}
