// JavaScript Document
<!--

	function processando(){
		document.getElementById('btenv').innerHTML = '&nbsp;';
		}

	function preprocessando(){
		document.getElementById('cpfchecktbl').height = '10';
		document.getElementById('cpf_check').height = '10';
		document.getElementById('btenv').innerHTML = '<input name="Button" type="button" class="botao" value="[ verificar ]" onClick="validaLogin()">';
		}

	function cadastTabela(){
		tblsize = document.getElementById('cadastrotbl').height;
		}


		
		function validaLogin(){
			email = document.validacao.email.value;
			
			if(email==''){
			
				if(email==''){
					document.validacao.email.style.backgroundColor='#FFFF99';
				} else if(email!=''){
					document.validacao.email.style.backgroundColor='#FFFFFF';
				}
			} else if(email!=''){
				document.getElementById('email').style.backgroundColor='#FFFFFF';
				document.validacao.submit();
				processando();
			}
		}
	   
// ---------------------------
// Função   : formatarCampoCEP()
// Descrição: Máscara de CEP
// ---------------------------
function formatarCampoCEP(src, mask){
  var i = src.value.length;
  var saida = mask.substring(0,1);
  var texto = mask.substring(i)
if (texto.substring(0,1) != saida)
  {
    src.value += texto.substring(0,1);
  }
}


// ---------------------------
// Função   : MascaraTelefone()
// Descrição: Máscara de Telefone (00)0000-0000
// ---------------------------
function MascaraTelefone(objeto){
   if(objeto.value.length == 0)
     objeto.value = '(' + objeto.value;

   if(objeto.value.length == 3)
      objeto.value = objeto.value + ')';

 if(objeto.value.length == 8)
     objeto.value = objeto.value + '-';
}

// ---------------------------
// Função   : soNumero()
// Descrição: Aceitar apenas númericos
// ---------------------------
function soNumero(e, decimal) {
var key;
var keychar;

if (window.event) {
   key = window.event.keyCode;
}
else if (e) {
   key = e.which;
}
else {
   return true;
}
keychar = String.fromCharCode(key);

if ((key==null) || (key==0) || (key==8) ||  (key==9) || (key==13) || (key==27) ) {
   return true;
}
else if ((("0123456789").indexOf(keychar) > -1)) {
   return true;
}
else if (decimal && (keychar == ",")) { 
  return true;
}
else
   return false;
}

//-->