// JavaScript Document
function valideer()
{
var el = document.form;
var pa = el.paper;
var sn = el.name;
var fn = el.firstname;
var co = el.company;
var em = el.email;

if(pa.value =="")
	{
		alert('Please choose your white paper');
		pa.focus();
		pa.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		pa.style.backgroundColor = "#ffffff";
		true;
	}

if(sn.value =="")
	{
		alert('Please fill in your name');
		sn.focus();
		sn.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		sn.style.backgroundColor = "#ffffff";
		true;
	}

if(fn.value =="")
	{
		alert('Please fill in your first name');
		fn.focus();
		fn.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		fn.style.backgroundColor = "#ffffff";
		true;
	}
	
if(co.value =="")
	{
		alert('Please fill in your company-name');
		co.focus();
		co.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		co.style.backgroundColor = "#ffffff";
		true;
	}

if(em.value.match(/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/))
	{
		em.style.backgroundColor = "#ffffff";
		true;
	}
	else
	{
		alert('Please fill in your e-mail address'); 
		em.focus();
		em.style.backgroundColor = "#f1eeef";
		return false;
	}
}


function validate()
{
var el = document.form;
var sn = el.name;
var fn = el.firstname;
var co = el.company;
var em = el.email;

if(sn.value =="")
	{
		alert('Please fill in your name');
		sn.focus();
		sn.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		sn.style.backgroundColor = "#ffffff";
		true;
	}

if(fn.value =="")
	{
		alert('Please fill in your first name');
		fn.focus();
		fn.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		fn.style.backgroundColor = "#ffffff";
		true;
	}
	
if(co.value =="")
	{
		alert('Please fill in your company-name');
		co.focus();
		co.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		co.style.backgroundColor = "#ffffff";
		true;
	}

if(em.value.match(/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/))
	{
		em.style.backgroundColor = "#ffffff";
		true;
	}
	else
	{
		alert('Please fill in your e-mail address'); 
		em.focus();
		em.style.backgroundColor = "#f1eeef";
		return false;
	}
}
