function SomenteNumero(e)
{
    var tecla=event.keyCode;
    if((tecla > 47 && tecla < 58) || tecla == 13)
			return true
    else
		{
    	if (tecla != 8) return false;
	    else return true;
    }
}

function formatar(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);
  }
}

function ValidaEmail(campo)
{   
	if (!ConsisteEmail(campo.value)  && campo.value != '')
	{
		alert("Favor Digitar o Email Corretamente.");
		campo.focus();
	}
}

function ConsisteEmail(valor) 
{
	var reg = /\w{1,}[@]\w{1,}[.]\w{1,}/
	return reg.test(valor);
}