function doSubmit() {

	if(isEmpty('vestiging', 'Vul alstublieft de gewenste vestiging in.')) {

		return false;
		
	} else if(isEmpty('grootte', 'Vul alstublieft de gewenste grootte in.')) {
	
		return false;
		
	} else if(isEmpty('huurperiodes', 'Vul alstublieft het gewenste aantal huurperiodes in.')) {
	
		return false;
		
	} else if(isEmpty('ingangsdatum', 'Vul alstublieft de dag van ingang in.')) {
		
		return false;
		
	} else if(isEmpty('voorletters', 'Vul alstublieft uw voorletters in')) {
	
		return false;
		
	} else if(isEmpty('naam', 'Vul alstublieft uw naam in.')) {
	
		return false;
		
	} else if(isEmpty('adres', 'Vul alstublieft uw adres in.')) {
	
		return false;
		
	} else if(isEmpty('postcode', 'Vul alstublieft uw postcode in.')) {
	
		return false;
		
	} else if(isEmpty('woonplaats', 'Vul alstublieft uw woonplaats in.')) {
	
		return false;
		
	} else if(isEmpty('telefoonnummer', 'Vul alstublieft uw telefoonnummer in.')) {
	
		return false;
		
	} else if(isEmpty('emailadres', 'Vul alstublieft uw e-mailadres in.')) {
	
		return false;
		
	} else {
		
		document.getElementById('check').value='dopass';
		
		return true;
		
	}
}

function doSubmitBelMij() {
	if(isEmpty('naam', 'Vul alstublieft uw naam in.')) {
		return false;
	} else if(isEmpty('telefoonnummer', 'Vul alstublieft uw telefoonnummer in.')) {
		return false;
	} else {
		document.getElementById('check').value='dopass';
		return true;
	}
}

function isEmpty(id, message) {
	if(!document.getElementById(id).value) {
		alert(message);
		document.getElementById(id).focus();
		return true;
	}
	return false;
}

function isValid(id, expression, message) {
	if(!document.getElementById(id).value.match(expression)) {
		alert(message);
		document.getElementById(id).focus();
		return false;
	}
	return true;
}

function openCalculator() {
	var height	= 359;
	var width	= 764;
	var left	= (screen.width - width) / 2;
	var top		= (screen.height - height) / 2;
	var calculator = window.open("Ruimtecalculator.asp", "calculator", "height=" + height + ",left=" + left + ",top=" + top + ",width=" + width + ",scrollbars=no");
}

function toggleDate(element) {
	document.getElementById("ingangsdatum").style.display = (element.checked) ? "none" : "inline";
}
