// JavaScript Document

function validateBooking(){
	
	if( document.userBooking.userVoorwaarden.checked !== true ){
		document.userBooking.userVoorwaarden.style.border = '1px solid #FF0000';
		alert('U dient akkoord te gaan met onze algemene voorwaarden.');
		return false;
	}
	
	return true;
	
}

function validateNewsletter(){
	
	if( document.newsletterForm.mail.value == '' ){
		alert('Vul een e-mailadres in.');
		return false;
	}
	
	if( document.newsletterForm.mail.value == 'E-MAILADRES' ){
		alert('Vul een e-mailadres in.');
		return false;
	}
	
	return true;
	
}

function switchMenu(){
	
	if( document.getElementById('europees1').style.display == 'none' ){
		
		document.getElementById('europees1').style.display = '';
		document.getElementById('europees2').style.display = '';
		
	} else {
	
		document.getElementById('europees1').style.display = 'none';
		document.getElementById('europees2').style.display = 'none';
		
	}
	
}

function validateDetails(){

	if( document.userBooking.itemAchternaam.value == '' ){
		alert('Vul a.u.b. uw achternaam in.');
		document.userBooking.itemAchternaam.focus();
		return false;
	}
	
	if( document.userBooking.itemInitialen.value == '' ){
		alert('Vul a.u.b. uw initialen in.');
		document.userBooking.itemInitialen.focus();
		return false;
	}
	
	if( document.userBooking.itemVoornaam.value == '' ){
		alert('Vul a.u.b. uw voornaam in.');
		document.userBooking.itemVoornaam.focus();
		return false;
	}
	
	if( document.userBooking.itemAdres.value == '' ){
		alert('Vul a.u.b. uw adres in.');
		document.userBooking.itemAdres.focus();
		return false;
	}
	
	if( document.userBooking.itemPostcode.value == '' ){
		alert('Vul a.u.b. uw postcode in.');
		document.userBooking.itemPostcode.focus();
		return false;
	}
	
	if( document.userBooking.itemWoonplaats.value == '' ){
		alert('Vul a.u.b. uw woonplaats in.');
		document.userBooking.itemWoonplaats.focus();
		return false;
	}
	
	if( document.userBooking.itemTelefoonnummer.value == '' ){
		alert('Vul a.u.b. uw telefoonnummer in.');
		document.userBooking.itemTelefoonnummer.focus();
		return false;
	}

	if( document.userBooking.itemEmailadres.value == '' ){
		alert('Vul a.u.b. uw e-mailadres in.');
		document.userBooking.itemEmailadres.focus();
		return false;
	}
	
	/* ////////// */
	/* Wachtwoord */
	/* ////////// */
	
	if( document.userBooking.itemWachtwoord.value == '' ){
		alert('Vul a.u.b. uw wachtwoord in.');
		document.userBooking.itemWachtwoord.focus();
		return false;
	}
	
	if( document.userBooking.itemWachtwoord_herhalen.value == '' ){
		alert('Vul a.u.b. nogmaals uw wachtwoord in.');
		document.userBooking.itemWachtwoord_herhalen.focus();
		return false;
	}
	
	if( document.userBooking.itemWachtwoord.value != document.userBooking.itemWachtwoord_herhalen.value ){
		alert('De wachtwoorden zijn niet gelijk met elkaar.');
		document.userBooking.itemWachtwoord.focus();
		return false;
	}
	
	return true;
	
}

function validatePassword(){

	if( document.loginForm.userEmail.value == '' ){
		alert('Vul a.u.b. uw e-mailadres in.');
		document.loginForm.userEmail.focus();
		return false;
	}
	
	return true;
	
}

function validateContact(){

	if( document.contactForm.naam.value == '' ){
		alert('Vul a.u.b. uw naam in.');
		document.contactForm.naam.focus();
		return false;
	}
	
	if( document.contactForm.telefoon.value == '' ){
		alert('Vul a.u.b. uw telefoonnummer in.');
		document.contactForm.telefoon.focus();
		return false;
	}
	
	if( document.contactForm.emailadres.value == '' ){
		alert('Vul a.u.b. uw e-mailadres in.');
		document.contactForm.emailadres.focus();
		return false;
	}
	
	if( document.contactForm.bericht.value == '' ){
		alert('Vul a.u.b. uw bericht in.');
		document.contactForm.bericht.focus();
		return false;
	}
	
	return true;
	
}

function validateLogin(){

	if( document.loginForm.userEmail.value == '' ){
		alert('Vul a.u.b. uw e-mailadres in.');
		document.loginForm.userEmail.focus();
		return false;
	}
	
	if( document.loginForm.userPass.value == '' ){
		alert('Vul a.u.b. uw wachtwoord in.');
		document.loginForm.userPass.focus();
		return false;
	}
	
	return true;
	
}
