function verificaEmailValido(email)
{
	var padrao = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
	return padrao.test(email);
}

function contaCaracteres(texto)
{
	if(texto != null)
	{		
		return texto.length;
	}
	else
	{
		return 0;
	}
}

function verificaMinimo(texto, minimo)
{
	if((texto != null) && (contaCaracteres(texto) >= minimo))
	{		
		return true;
	}
	else
	{
		return false;
	}	
}

function verificaMaximo(texto, maximo)
{
	if((texto != null) && (contaCaracteres(texto) <= maximo))
	{		
		return true;
	}
	else
	{
		return false;
	}
}
