function Valida()
{	p = document.formulario;
	falta = "";
	if(p.nome.value == "")
	{	falta = falta +"Nome\n";
	}
	if(p.email.value == "")
	{	falta = falta +"E-mail\n";
	}
	if(p.texto.value == "")
	{	falta = falta +"Mensagem\n";
	}
	
	
  if(p.nome.value == "" || p.email.value == "" || p.texto.value == ""  ) 
    	{
      		alert("Os Seguintes campos obrigatórios você deixou em branco:\n" + falta);
			if(p.texto.value == "") 
			{	p.texto.focus();
			}
			if(p.email.value == "")
			{	p.email.focus();
			}
			if(p.nome.value == "")
			{	p.nome.focus();
			}
			
      		return false;
    }

	else
	{
	 if (Verifica_Campo_Email(p.email.value)==true)
	 {
		alert("EMAIL Inválido!");
		p.email.focus();
		return false;
	 }
	}	

  
  return true;
}

function Verifica_Campo_Email(campo)
{
 var email=''		 
	   	email = campo.value;
		var doc  = document.formulario;		
		if (doc.email.value.indexOf("@") < 0 || doc.email.value.indexOf(".") < 0)
		  {	
//			alert("EMAIL Inválido!");
//			doc.smail.focus();
			return true;}
		else	    	
			return false;					 

}

function CapturaEventoNetscape(){
	if (navigator.appName == "Netscape") {
		document.captureEvents(Event.KEYPRESS);
		document.onkeypress = Resto;
		return true;
	}
}

function DesligaCapturaNetscape(){
	if (navigator.appName == "Netscape")
		document.releaseEvents(Event.KEYPRESS);
	return true;
}

function Resto(event){
    Tecla = event.which;
    if(Tecla == null) Tecla = event.keyCode;
//	alert(Tecla);
	if (Tecla == 13 ) {
		Valida();
		return false;	
	}
  event.cancelBubble = true;

//  if((Tecla > 47 && Tecla < 58)) // Somente numeros

  if((Tecla > 57) || (Tecla == 32)) // Somente letras 
  {

	  return true
  }	
	
	return false;
}
