// ---------------------------------------------------------------------------------------	
// Verifica se a palavra não possui mais de 20 caracteres
// ---------------------------------------------------------------------------------------	
function MaiorQue20(field, maior20){
		
		if (maior20 == true)
			return true;
		
		var checkOK = "1234567890ABCDEFGHIJKLMNOPQRSTUVXYZW";
		var checkStr = field.value.toUpperCase();
		var nQtd = 0;
		
		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++){
				if (ch == checkOK.charAt(j))
					nQtd = nQtd + 1;5
				if (ch == " "){
					if (nQtd > 20){
						return false;
						break;
					}
					nQtd = 0;
				}
			}
		}
		
          if (nQtd > 20)
			  return false;		

              return true;
}

function TxMaiorQue20(texto, maior20){
		
		if (maior20 == true)
			return true;
		
		var checkOK = "1234567890ABCDEFGHIJKLMNOPQRSTUVXYZW";
		var checkStr = texto.toUpperCase();
		var nQtd = 0;
		
		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++){
				if (ch == checkOK.charAt(j))
					nQtd = nQtd + 1;5
				if (ch == " "){
					if (nQtd > 20){
						return false;
						break;
					}
					nQtd = 0;
				}
			}
		}
		
          if (nQtd > 20)
			  return false;		

              return true;
}

