
var myrules = {
	'#formContacto' : function(el){
		el.onsubmit = function(){
			if (this.nombre.value == ""){
				alert('Escriba el nombre de la persona de contacto');	
				this.nombre.focus();
				return false;
			}
			if (this.telefono.value == ""){
				alert('Escriba el teléfono');	
				this.telefono.focus();
				return false;
			}
			if (this.email.value == ""){
				alert('Escriba el email');	
				this.email.focus();
				return false;
			}		
			if (this.asunto.value == ""){
				alert('Escriba el asunto');	
				this.asunto.focus();
				return false;
			}
			if (this.mensaje.value == ""){
				alert('Escriba el mensaje');	
				this.mensaje.focus();
				return false;
			}			
			this.submit();
		}
	}
};

Behaviour.register(myrules);
