function CheckFormularioContacto(obj)
{
	
	
	obj.tNombre.style.borderColor = '#B3B3B3';
	obj.tNombre.style.backgroundColor = '#F2F2F2';
	obj.tApellidos.style.borderColor = '#B3B3B3';
	obj.tApellidos.style.backgroundColor = '#F2F2F2';
	obj.tTelefono.style.borderColor = '#B3B3B3';
	obj.tTelefono.style.backgroundColor = '#F2F2F2';
	obj.tTexto.style.borderColor = '#B3B3B3';
	obj.tTexto.style.backgroundColor = '#F2F2F2';
	
	if (obj.tNombre.value == "")
	{
		obj.tNombre.focus();
		obj.tNombre.style.borderColor = 'red';
		obj.tNombre.style.backgroundColor = 'white';
		
		daEstiloMsg('Para poder mandala mensaxe deve completar tódolos campos do formulario. Escriba o seu <b>nome</b> por favor.');
		return false;
	}
	if (obj.tApellidos.value == "")
	{
		obj.tApellidos.focus();
		obj.tApellidos.style.borderColor = 'red';
		obj.tApellidos.style.backgroundColor = 'white';
		
		daEstiloMsg('Para poder mandala mensaxe deve completar tódolos campos do formulario. Escriba os seus <b>apelidos</b> por favor.');
		return false;
	}
	if (obj.tTelefono.value == "" && obj.tMail.value == "")
	{
		obj.tTelefono.focus();
		obj.tTelefono.style.borderColor = 'red';
		obj.tTelefono.style.backgroundColor = 'white';
		
		daEstiloMsg('Para poder mandala mensaxe deve completar tódolos campos do formulario. Escriba o seu <b>télefono</b> ou <b>correo electrónico</b> de contacto, para que poidamos poñernos en contacto con vostede.');
		return false;
	}
	if (obj.tTexto.value == "")
	{
		obj.tTexto.focus();
		obj.tTexto.style.borderColor = 'red';
		obj.tTexto.style.backgroundColor = 'white';
		
		daEstiloMsg('Para poder mandala mensaxe deve completar tódolos campos do formulario. Indiquenos o <b>motivo da consulta</b> ou as dúvidas que poida ter.');
		return false;
	}
	
	document.getElementById('contenidoMail').style.visibility = 'hidden';
	document.getElementById('izquierda').style.backgroundImage = 'url(../img/load.gif)';
	document.getElementById('izquierda').style.backgroundPosition = 'center center';
	
	return true;
}

function daEstiloMsg(msg)
{
	img = '<img src="img/noaccess.jpg" alt="¡ATENCIÓN!" widht="50" height="50"><br>';
	
	document.getElementById('alertaMsg').style.textAlign = 'center';
	document.getElementById('alertaMsg').style.border = '1px red solid';
	document.getElementById('alertaMsg').style.padding = '5px';
	document.getElementById('alertaMsg').innerHTML = img + msg;
}