function campo_vazio(texto){
   var len = texto.length;
   var pos;
   var novoTexto = "";

   for (pos=0; pos<len; pos++){
      if (texto.substring(pos, (pos+1)) != " "){
         novoTexto = novoTexto + texto.substring(pos, (pos+1));
      }
   }

   if (novoTexto.length > 0)
      return false;
   else
      return true;
}

function campo_numero(texto) {

	var key = ''; 

	var strCheck = '0123456789'; 

	var whichCode = (window.Event) ? texto.which : texto.keyCode; 

	if (whichCode == 13) return true; 

	key = String.fromCharCode(whichCode);

	if (strCheck.indexOf(key) == -1) return false; 

}