
function validateForm(event)
{	
	var nombre = $('nombre').value;
	var apellidos = $('apellidos').value;
	var email = $('email').value;
	var telefono = $('telefono').value;
	var movil = $('movil').value;
	var corto = $('corto').checked;
	
	var error = false;
	var errorText = '';
	
	if ('' == nombre)
	{	
		error = true;
		errorText = errorText + '\nEl campo Nombre es obligatorio.';
	}
	
	if ('' == apellidos)
	{	
		error = true;
		errorText = errorText + '\nEl campo Apellidos es obligatorio.';
	}	
	
	if ('' == email)
	{	
		error = true;
		errorText = errorText + '\nEl campo Email de contacto es obligatorio.';
	}
	
	if ('' == telefono)
	{	
		error = true;
		errorText = errorText + '\nEl campo Teléfono de contacto es obligatorio.';
	}
	
	if ('' == movil)
	{	
		error = true;
		errorText = errorText + '\nEl campo Teléfono móvil es obligatorio.';
	}

	if ('' == corto)
	{	
		error = true;
		errorText = errorText + '\nDebe haber leído y aceptado la declaración de privacidad.';
	}		

	if (error)
	{
		alert('Debe rellenar todos los campos del formulario.' + errorText);
		Event.stop(event);
		return false;
	}
	else	
	{
		return true;
	}
}

Event.observe(window, 'load', function() {
	Event.observe('contactoParticularesForm', 'submit', validateForm);
});
