	function valida ( local ){
		var localValidar = document.getElementById(local);
		var formulario = localValidar.getElementsByTagName("input");
		var tarea = localValidar.getElementsByTagName("textarea");
		
		for (var i=0; i < formulario.length; i++){
			
			 try {
							var obj = document.getElementById('email');
							  var txt = obj.value;
							  if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7)))
							  {
								alert('Digite seu email real, para que possamos entrar em contato');
								obj.focus();
								obj.style.backgroundColor = "#F2B0B3";
								return false;
							  }
							  
					  
							  
							  
			 } catch(err){
				 
			 }
			
			
			
			
			if (formulario[i].value == "" && formulario[i].disabled == false){
				var aux = formulario[i].title.toUpperCase();
				alert ("O campo " + aux + " deve ser preenchido");
				formulario[i].focus();
				formulario[i].style.backgroundColor = "#F2B0B3";
				return false;
			}
			formulario[i].style.backgroundColor = "#CDF3D2";
			
			}
				
											for (var i=0; i < tarea.length; i++){
									if (tarea[i].value == ""){
										var aux2 = tarea[i].title.toUpperCase();
										alert ("O campo " + aux2 + " deve ser preenchido");
										tarea[i].focus();
										tarea[i].style.backgroundColor = "#F2B0B3";
										return false;
									}
									tarea[i].style.backgroundColor = "#CDF3D2";
									}
				ValidaEmail();					
			
			return true;
				
	}




