// JavaScript Document

function CheckFormMail(){
	var Form = document.getElementById('FrmContato');
	if( Form.edNome.value == '' ){
		alert("O campo Nome não pode estar em branco.");
		Form.edNome.focus();
		return false;
	}
	if( Form.edEmail.value == '' ){
		alert("O campo E-mail não pode estar em branco.");
		Form.edEmail.focus();
		return false;
	}
	if( Form.edTelefone.value == '' ){
		alert("O campo Telefone não pode estar em branco.");
		Form.edTelefone.focus();
		return false;
	}
	if( Form.edAssunto.value == '' ){
		alert("O campo Assunto não pode estar em branco.");
		Form.edAssunto.focus();
		return false;
	}
	if( Form.edMensagem.value == '' ){
		alert("O campo Mensagem não pode estar em branco.");
		Form.edMensagem.focus();
		return false;
	}
	return true;
}

function FormataFone(Campo,e) 
{ 
	if (document.all){ // Internet Explorer
			var tecla = event.keyCode;
	}else{ // Nestcape
		var tecla = e.which;
	}
			
   	qtdcaracteres = (Campo.value).length; 
    if(qtdcaracteres == 0)
		if( tecla != 8 )
    	   	Campo.value = "(" + Campo.value; 
    if(qtdcaracteres == 3) 
		if( tecla != 8 )
	       	Campo.value = Campo.value + ") "; 
    if(qtdcaracteres == 9) 
		if( tecla != 8 )
	       	Campo.value = Campo.value + "-"; 			
}

	function Tecla(e)
	{
		if (document.all) // Internet Explorer
			var tecla = event.keyCode;
		else // Nestcape
			var tecla = e.which;
			
		if(tecla > 44 && tecla < 58 || tecla > 95 && tecla < 106 || tecla == 08){ // numeros de 0 a 9
			return true;
		}
	
	}
	
	
