// JavaScript Document
function valida_vazio()
				{//senha, razaosocial, nomefantasia, cep, endereco, bairro, cidade, estado, atividade
					var	campo0 = document.getElementById("nome");
					var	campo1 = document.getElementById("sobrenome");
					var	campo2 = document.getElementById("empresa");
					var	campo3 = document.getElementById("cargo");
					var	campo4 = document.getElementById("telefone");
					var	assunto = document.getElementById("assunto");
					var	campo5 = document.getElementById("mensagem");
					var	conheceu = document.getElementById("conheceu");
					
					
					
					var	email = document.getElementById("email");

				

							if( campo0.value=="" )
							{
							alert("Preencha o campo corretamente!");
							campo0.style.backgroundColor="#FF5B5B";
							
							return false;
							}
							else if( campo1.value=="" )
							{
							alert("Preencha o campo corretamente!");
								campo1.style.backgroundColor="#FF5B5B";
							return false;
							}
							else if( campo2.value=="")
							{
							alert("Preencha o campo corretamente!");
								campo2.style.backgroundColor="#FF5B5B";
							return false;
							}
							
							
							
							
							else if( email.value=="" || email.value.indexOf('@')==-1 || email.value.indexOf('.')==-1 || email.value.indexOf(',')!=-1 )
				{
				alert( "Preencha o E-mail corretamente!" );
				
				email.style.backgroundColor="#FF5B5B";
							
				email.focus();
				return false;
				}
							else if( campo3.value=="")
							{
							alert("Preencha o campo corretamente!");
							campo3.style.backgroundColor="#FF5B5B";
							
							return false;
							}
							 else if( campo4.value=="")
							{
							alert("Preencha o campo corretamente!");
							campo4.style.backgroundColor="#FF5B5B";
							
							return false;
							}
							
							 else if( campo4.value.length < 12)
							{
							alert("Preencha o campo corretamente!");
							campo4.style.backgroundColor="#FF5B5B";
							
							return false;
							}
								 else if( conheceu.value=="")
							{
							alert("Preencha o campo corretamente!");
							conheceu.style.backgroundColor="#FF5B5B";
							
							return false;
							}
							
							
								 else if( assunto.value=="")
							{
							alert("Preencha o campo corretamente!");
							assunto.style.backgroundColor="#FF5B5B";
							
							return false;
							}
							
							else if( campo5.value=="")
							{
							alert("Preencha o campo corretamente!!");
							campo5.style.backgroundColor="#FF5B5B";
							
							return false;
							}
							
				}
				
				
				function marca(campo)
{ campo.style.backgroundColor="#FFFFCC"; }// Usuário clica no campo, ele apresenta a cor amarelo claro
	
			function tira(campo)
		{campo.style.backgroundColor="#FFFFFF"; }// Usuário retira o cursor do campo, clicando em outro ele assume a cor branca
		
		
		
			   function MascTel(campo,documento,f){
         var mydata = '';
         mydata = mydata + documento;

         if (mydata.length == 1){
            mydata   =  '('+mydata;

            ct_campo = eval("document."+f+"."+campo+".value = mydata");
            ct_campo;
         }

         if (mydata.length == 3){
                  mydata   = mydata + ')';

                  ct_campo = eval("document."+f+"."+campo+".value = mydata");
                  ct_campo;
         }

         if (mydata.length == 8){
            mydata      = mydata + '-';

            ct_campo1 = eval("document."+f+"."+campo+".value = mydata");
            ct_campo1;
         }
		   }
		   
		   function val_tel()
		   {
			   
			   var	tel = document.form1.telefone.value;
			   
			      if (tel.length <=12)
				  {
				  alert( "Preencha o Telefone corretamente!" );
						
						
									
						document.form1.telefone.focus();
						return false;
        			}
			   
			   }
			   
			   function v_NR(tecla)
	{

	if(typeof(tecla) == 'undefined')
	
	var tecla = window.event;
	
	var codigo = (tecla.which ? tecla.which : tecla.keyCode ? tecla.keyCode : tecla.charCode);
	
	// permite números, 8=backspace, 46=del e 9=tab
		if ( (codigo >= 48 && codigo <= 57) || (codigo >= 96 && codigo <= 105) || codigo == 8 || codigo == 46 || codigo == 9 )
		
		{ return true; }
				else
				{ /*alert("Apenas números são permitidos!");*/ return false; } 

	}
