// JavaScript Document
function validate()
{
var el = document.contactform;
var na = el.name;
var ma = el.mail;
var ci = el.city;

if(na.value =="")
	{
		//alert('Please fill in your first name');
		na.focus();
		document.getElementById('na_error').innerHTML = '<img src="images/cross.png" style="float:left;border:none;margin:0 10px;padding:0;" />';
		na.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		
		document.getElementById('na_error').innerHTML = '<img src="images/check.png" style="float:left;border:none;margin:0 10px;padding:0;" />';
		na.style.backgroundColor = "#ffffff";
		true;
	}

if(ma.value.match(/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/))
	{
		document.getElementById('ma_error').innerHTML = '<img src="images/check.png" style="float:left;border:none;margin:0 10px;padding:0;" />';
		ma.style.backgroundColor = "#ffffff";
		true;
	}
	else
	{
		ma.focus();
		document.getElementById('ma_error').innerHTML = '<img src="images/cross.png" style="float:left;border:none;margin:0 10px;padding:0;" />';
		ma.style.backgroundColor = "#f1eeef";
		return false;
	}

if(ci.value =="")
	{
		ci.focus();
		document.getElementById('ci_error').innerHTML = '<img src="images/cross.png" style="float:left;border:none;margin:0 10px;padding:0;" />';
		ci.style.backgroundColor = "#f1eeef";
		return false;		
	}
	else
	{
		document.getElementById('ci_error').innerHTML = '<img src="images/check.png" style="float:left;border:none;margin:0 10px;padding:0;" />';
		ci.style.backgroundColor = "#ffffff";
		true;
	}
}

function valideer()
{
var el = document.newsletterform;
var na = el.name;
var ma = el.mail;
var ci = el.city;
var cy = el.ctry;

if(ma.value.match(/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/))
	{
		ma.style.backgroundColor = "#cec8bf";
		true;
	}
	else
	{
		ma.focus();
		ma.style.backgroundColor = "#fcfab7";
		return false;
	}

if(na.value =="")
	{
		//alert('Please fill in your first name');
		na.focus();
		na.style.backgroundColor = "#fcfab7";
		return false;		
	}
	else
	{
		na.style.backgroundColor = "#cec8bf";
		true;
	}

if(ci.value =="")
	{
		ci.focus();
		ci.style.backgroundColor = "#fcfab7";
		return false;		
	}
	else
	{
		ci.style.backgroundColor = "#cec8bf";
		true;
	}

if(cy.value =="")
	{
		cy.focus();
		cy.style.backgroundColor = "#fcfab7";
		return false;		
	}
	else
	{
		cy.style.backgroundColor = "#cec8bf";
		true;
	}
}
