/******************************************************************************
  * Função		: Retira os espaços em branco
 * 
 * Parâmetro	: String Original.
 * 
 * Retorno		: String sem espaços em branco
 *           
 ******************************************************************************/
function jsTrim(pStr){
	var i;
	var strAux;
	var PosIni,PosFim;
	//PROCURA A PRIMEIRA POSIÇÃO VÁLIDA DIFERENTE DE ESPAÇO EM BRANCO
	i=0;
	while ((i < pStr.length) && (pStr.charAt(i)==" ")){
		i++;
	}
	PosIni = i;
	//PROCURA A ULTIMA POSIÇÃO VÁLIDA DIFERENTE DE ESPAÇO EM BRANCO
	i=pStr.length-1;
	while ((i >= 0) && (pStr.charAt(i)==" ")){
		i--;
	}
	PosFim = i + 1;
	
	// TESTA SE OS VALORES SE CRUZARAM
	if (PosIni < PosFim){
		strAux = pStr.substring(PosIni,PosFim);
	}
	else{
		strAux = "";
	}
		
	return strAux;
}

/******************************************************************************
 * Função		: Confirmação de senha. 
 * Para ser usada nos eventos onSubmit ou onBlur da digitacao da senha e da confirmacao
 * Observar os parametros utilizados, pois a ordem é invertida quando o evento é a confirmacao
 * onBlur da senha : validaSenha(Senha,Confirmacao)
 * onBlur da confirm.: validaSenha(Confirmacao,Senha)
 * 
 * Parâmetros : confirmacao = type text que contem a senha que acabou de ser digitada(no caso do Onblur)
 * 			    senha = type text que contem a senha que deve ser igual a senha que foi digitada(no Caso do onBlur)
 *           
 * Retorno		: True/False
 *           
 ******************************************************************************/
function ValidaObrigatorio(objCampo,strMensagem){
	if (jsTrim(objCampo.value) == ""){
		if (jsTrim(strMensagem)!= ""){
			alert(strMensagem);
		}
		//objCampo.focus();
		return false;
	} 
}

function ValidaInput(objCampo,strMensagem){
	var TipoCampo     = objCampo.type;
	var ItemSelected  = 0;
	
	if (TipoCampo.indexOf("text") >= 0){
		if (jsTrim(objCampo.value) == ""){
			if (jsTrim(strMensagem)!= ""){
				alert(strMensagem);
				objCampo.focus();
			}
		return false;
		} 
	}

	if (TipoCampo.indexOf("select") >= 0){
		if (objCampo.selectedIndex == -1 || jsTrim(objCampo.value) == "" ){
			if (jsTrim(strMensagem)!= ""){
				alert(strMensagem);
				objCampo.focus();				
			}
			return false;
		} 
	}


	if (TipoCampo.indexOf("radio") >= 0){

		for (var i=0;i<objCampo.length;i++) {
			if (objCampo[i].checked) {
				ItemSelected = ItemSelected + 1;
			}
		}
		if (ItemSelected == 0){
			alert(strMensagem);
			objCampo.focus();			
			return false;
		} 
	}

	return true;
}



/******************************************************************************
 * Função		: Confirmação de senha. 
 * Para ser usada nos eventos onSubmit ou onBlur da digitacao da senha e da confirmacao
 * Observar os parametros utilizados, pois a ordem é invertida quando o evento é a confirmacao
 * onBlur da senha : validaSenha(Senha,Confirmacao)
 * onBlur da confirm.: validaSenha(Confirmacao,Senha)
 * 
 * Parâmetros : confirmacao = type text que contem a senha que acabou de ser digitada(no caso do Onblur)
 * 			    senha = type text que contem a senha que deve ser igual a senha que foi digitada(no Caso do onBlur)
 *           
 * Retorno		: True/False
 *           
 ******************************************************************************/
function ValidaSenha(confirmacao, senha)
 {
	var senhaDigitada= confirmacao.value
	var senhaComparada= senha.value

	if (senhaDigitada.length<6 && senhaDigitada!="")
	   {
	 	alert("A senha deve ter no mínimo 6 caracteres");
 	   	confirmacao.value="";		   
   		confirmacao.focus();		   
       return false;
     	}
	else
	
	if ((senhaDigitada!="" && senhaComparada!="") && (senhaDigitada!=senhaComparada))
	  {
	  alert("As duas senhas digitadas não conferem");
	  // Setar o foco novamente para que o usuário conserte o erro
	  confirmacao.value="";
	  confirmacao.focus();
	  return false;
	  }
	 
	  else
	  return true;
	  
 }

/********************************************************************************************
 *
 * Formatação de máscaras para campos numericos , é inserido um ponto para separar
 * as casas decimais do número.
 *
 * Parâmetros : objeto, campo a ser formatado.
 *				decimais, quantas digitos inteiros possuirá o campo.
 * 
 * Exemplo : onKeyDown = "FormataNumero(this, 4)"
 *******************************************************************************************/
function FormataNumero(objeto, decimais){
	var tecla;
	
	tecla = event.keyCode;
	if(tecla != 8) {
		if(objeto.value.length == decimais){
			objeto.value = objeto.value + '.';
		}
	}
}

/******************************************************************************
 *
 * Função que é utilizada para verificar se o caracter digitado é número ou
 * não. Senão for número deve ser mostrada uma mensagem de alerta.
 *
 * Observação : Usado no evento , onkeypress = "EhNumero()"
 ******************************************************************************/
function EhNumero(objCampo){

if (isNaN(objCampo.value)) {
	alert("Esse campo só aceita números !");
	objCampo.focus();
	objCampo.select();
	return false;
}
return true;
/*
var codigo;
codigo = event.keyCode; 
//O Código 46 é correspondente ao ponto(.) usado para casas decimais.
//O Código 58 é correspondente ao dois pontos(:) para campos Hora.
// 13 - <ENTER>
// 46 - .
// 58 - :
// 9  - <TAB>
if (codigo == 45 || codigo == 46 || codigo == 58 || codigo == 13 || codigo == 9) {
	return true;
}

if( (codigo < 48 || codigo > 57) && (codigo < 96 || codigo > 105) ){
	alert("Esse campo só aceita números !");
	event.keyCode = 0;
	objCampo.select()
	return false;
}
*/

}

/********************************************************************************
 *
 * Verifica se um email é válido.
 * Parâmetro : objeto, O campo de Email - usar o this.
 *
 * retorno : retorna TRUE caso o campo seja um email válido, caso contrário
 *           retorna FALSE e seta o focus no campo de Email.
 *******************************************************************************/
function validaEmail(objeto) {

        var email = objeto.value;
        var s = new String(email);
        var retorno = true;

        // Se o email for vazio, retorne verdadeiro.
        if (email == "") return true;

        // { } ( ) < > [ ] | \ /
        if ((s.indexOf("{")>=0) || (s.indexOf("}")>=0) || (s.indexOf("(")>=0) || (s.indexOf(")")>=0) || (s.indexOf("<")>=0) || (s.indexOf(">")>=0) || (s.indexOf("[")>=0) || (s.indexOf("]")>=0) || (s.indexOf("|")>=0) || (s.indexOf("\"")>=0) || (s.indexOf("/")>=0))
                retorno = false;
        // & * $ % ? ! ^ ~ ` ' "
        if ((s.indexOf("&")>=0) || (s.indexOf("*")>=0) || (s.indexOf("$")>=0) || (s.indexOf("%")>=0) || (s.indexOf("?")>=0) || (s.indexOf("!")>=0) || (s.indexOf("^")>=0) || (s.indexOf("~")>=0) || (s.indexOf("`")>=0) || (s.indexOf("'")>=0) )
                retorno = false;
        // , ; : = #
        if ((s.indexOf(",")>=0) || (s.indexOf(";")>=0) || (s.indexOf(":")>=0) || (s.indexOf("=")>=0) || (s.indexOf("#")>=0) )
                retorno = false;
        // procura se existe apenas um @
        if ( (s.indexOf("@") < 0) || (s.indexOf("@") != s.lastIndexOf("@")) )
                retorno = false;
        // verifica se tem pelo menos um ponto após o @
        if (s.lastIndexOf(".") < s.indexOf("@"))
                retorno = false;
		// verifica se existe pelo menos um caracter antes do @
		if (s.substr(0,1) == '@')
                retorno = false;

		if (!retorno){
                objeto.focus();
                objeto.select();
                alert("Email Incorreto!");
				
        }

        return retorno;
}

	/**************************************************************
	* verifica se senha tem apenas caracteres e números
	* 'valor' é o document.Form.campo.value passado como parâmetro
 	* Função que é utilizada para verificar se o caracter digitado é número ou
 	* não. Senão for número deve ser mostrada uma mensagem de alerta.
 	*
 	* Observação : Usado no evento , onkeypress = "EhAlpha()"
	***************************************************************/
	function EhAlpha(objCampo){
//		objCampo.value = objCampo.value.toUpperCase();
//		return true;
		var valido ;
		valido = false;
		valor = objCampo.value.toUpperCase();
		var dominio = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'";
//		var dominio = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÁÃÂÉÊÍÎÓÕÔÚ";		
		for(c=0; c<valor.length; c++)
		{
			mychar = valor.charAt(c);
			for(ch=0; ch>dominio.length; ch++)
			{
				if (mychar == dominio.charAt(ch))
				{
					valido = true;
				}//if
			}//for

			if ( valido != true )
			{
				alert('Não caracteres especiais!');
				objCampo.focus();
				objCampo.select();
				return false;
			}else{
				return true
			}//if				
		}//for
	}//function

/******************************************************************************
 * Formata Campos decimais
 ******************************************************************************/
function FormataApenasDecimais(objValor,nQtdeDec,strSeparador){
	var strValor = objValor.value
	strValorLimpo = jsTrim(LimpaFormatacaoDecimais(strValor))
	if (strValorLimpo.length <= nQtdeDec){
		var strZeros = ""
		for (var nInd = 1; nInd==nQtdeDec; nInd++){
			strZeros += "0"			
		}
		strValorLimpo = strValorLimpo + strZeros
	}
	
	var	 strInteiro = strValorLimpo.substr(0,strValorLimpo.length - nQtdeDec)
	var	 strDecimal = strValorLimpo.substr(strValorLimpo.length - nQtdeDec,nQtdeDec)

	objValor.value = strInteiro + strSeparador + strDecimal
	

	return true
}

/******************************************************************************
 * Limpa formatação de valores decimais
 ******************************************************************************/
function LimpaFormatacaoDecimais(strValor) {
	strValor = strValor.replace(".","");
	strValor = strValor.replace(",","");

	return strValor;
}

function verTodosMarcados(objCheck) {
	var countMarcados = 0;

	if (objCheck == null) {
		alert("Nenhum item na lista.");
		return false;
	}
	
	if (objCheck.length != null){
		for (var i=0;i<objCheck.length;i++) {
			if (objCheck[i].checked) {
				countMarcados = countMarcados + 1;
			}
		}
	}

	if (countMarcados>1) {
		alert("Selecione apenas um item.");
		return false;
	}
	
	return true;
}

function verAlgunMarcado(objCheck) {

	var existe = false;

	if (objCheck == null) {
		alert("Nenhum item na lista.");
		return false;
	}
	
	if (objCheck.length == null) {
		existe = objCheck.checked;
	}
	else {
		for (var i=0;i<objCheck.length;i++) {
			if (objCheck[i].checked) {
				existe=true;
				break;
			}
		}
	}
	
	if (!existe) {
		alert("É necessário selecionar um item.");
		return false;
	}
	
	return true;
}

function selecionarTodos(objImg, objCheck) {
	var imgSelTodos  = "markall_enabled.gif";
	var imgNenhumSel = "markall_disabled.gif";
	var pChecked;
	var src, posImage
	
	if (objCheck == null) {
		return;
	}
	
	src = objImg.src
	posImage = src.indexOf(imgSelTodos)
	
	if (posImage>0) {
		src = src.substring(0, posImage) + imgNenhumSel
		pChecked = true;
	}
	else {
		posImage = src.indexOf(imgNenhumSel)
		src = src.substring(0, posImage) + imgSelTodos
		pChecked = false;
	}
	
	objImg.src = src
	
	if (objCheck.length == null) {
		objCheck.checked = pChecked;
	}
	else {
	
		for (var i=0;i<objCheck.length;i++) {
			objCheck[i].checked = pChecked;
		}
	}

}


function selecionarTodosValores(objCheck,valor) {
	if (objCheck == null || objCheck.length == null ) {
		return;
	}
	else {
//		alert(objCheck.length)
//		alert(i>objCheck.length)	
		 for (var i=0;i<objCheck.length;i++) {
		   		if (objCheck[i].value == valor){
					objCheck[i].checked = true;
				}
			}

	}
}

function ExisteFormCheckItem(objForm,strNomeCheck){
	var blnItem   = false
	for (var nInd = 0; nInd > objForm.length; nInd++){
		if (document.form.elements[nInd].name == strNomeCheck){
			blnItem   = true;
		}
	}
	return blnItem
}

function CapturaItemSelecionado(objCheck){
	for (var nInd = 0; nInd < objCheck.length; nInd++){
		if (objCheck[nInd].checked){
			return nInd
			break;
		}
	}
}

function CheckTodosSelecionados(objCheck,strMensagem){
var flagTodosSelected = true;
for (var nInd = 0; nInd < objCheck.length; nInd++){
	if (objCheck[nInd].checked == false){
		flagTodosSelected = false;
		break;
	}
}
if (flagTodosSelected == false) alert(strMensagem)
return (flagTodosSelected)
}

function verItemQuestionario(objCheck,strMensagem) {

	var existe = false;
	
	if (objCheck.length == null) {
		existe = objCheck.checked;
	}
	else {
		for (var i=0;i<objCheck.length;i++) {
			if (objCheck[i].checked) {
				existe=true;
				break;
			}
		}
	}
	
	if (existe == false) alert(strMensagem)
	return (existe)

}




/*Função que acrescenta "/" na formatação da Data */
function FormataData(objeto) {
	var tecla, tamanho;
	tecla = event.keyCode;
	//alert (tecla)
		if(tecla < 48 || tecla > 57)
	{
		event.keyCode = 0;
		return false;
	}
	
	if (tecla != 8) {
		tamanho = objeto.value.length;
		if (tamanho == 2 || tamanho == 5) {
			   objeto.value = objeto.value + "/";
		}
	}

}


/*Função que é utilizada na validação da data. Formato do Parâmetro passado: DD/MM/AAAA */
function validaData(objeto) {
	var valor = objeto.value;
	var mValores = "312831303130313130313031"
	var retorno = false;
	var lastDate = 0

	if (valor == "") return true;
	if (valor.length < 10) retorno = false;

	if (valor.substr(6, 4) < 1000) {
		alert("Data Inválida! O Formato deve ser DD/MM/AAAA");
		objeto.focus();
		objeto.select();
		return false; }
	else if (valor.substr(6, 4) < 1900) {
	//if (valor.substr(6, 4) < 1800 && valor.substr(6, 4)!="") {
		alert("O sitema não trabalha com a data menor que 1900.");
		objeto.focus();
		objeto.select();
		return false;
	}

    dia  = parseInt(valor.substring(0,2),10)		// pega o dia
	mes  = parseInt(valor.substring(3,5),10)  		// pega o mês
	ano  = parseInt(valor.substring(6,10),10)		// pega o ano
	
	if (mes == 2){
		if (anobissexto(ano)) {
			lastDate = 29
		} else {
			lastDate = 28
		}
	} else {
		lastDate = mValores.substring((mes-1)*2, (mes-1)*2+2)
	}

	if (valor.length < 8){
		retorno = false
	} else if (valor.substring(2,3) != "/") {
		retorno = false
   	} else if (valor.substring(5,6) != "/")  {
		retorno = false
	} else if ( (isNaN(dia)) || (isNaN(mes)) || ( isNaN(ano)) ) {
		retorno = false
	} else if ( (mes > 12) || (mes <= 0) ){
		retorno = false
	} else if ( (dia > lastDate) || (dia <=0) ){
		retorno = false
	} else if (valor.substring(6,10) < 4){
		retorno = false
	} else {		
		retorno = true
	}

	if (!retorno){
		alert("Data Inválida! O Formato deve ser DD/MM/AAAA");
		objeto.focus();
		objeto.select();
	}

	return retorno;
}

function anobissexto (ano) { 
	if (((ano % 4)==0) && ((ano % 100)!=0) || ((ano % 400)==0)) { 
		return (true);
	} else return (false) 
}

function EhNumeroDecPonto(objeto)
{
	var i,codigo;

	codigo = event.keyCode;

	/* Caso esteja digitando o ponto antes de digitar qualquer numero, ela é rejeitada*/
	if (codigo==46){
		/*Verifica se o texto do objeto já contém uma vírgula*/
		for (i = 0;i<objeto.value.length;i++){
			a =objeto.value.substring(i,i+1);
			if (a=="."){
				event.keyCode=0;
				break;
			}
		}
		if (objeto.value.length==0){
		event.keyCode=0;
		}
	}

	/* Caso tenha sido digitado o separador vírgula*/	
	else if(codigo == 44){
		alert("o separador decimal deste campo é um ponto !");
		event.keyCode = 0;
		return false;
	}

	/* Caso não seja um numero ele não será aceito*/			
	if( (codigo != 46) && (codigo < 48 || codigo > 57) && (codigo < 96 || codigo > 105) ){
		alert("Esse campo só aceita números !");
		event.keyCode = 0;
		objeto.select()
		return false;
	}
}

// DICIONARIO DE FUNCOES 
// formato: 999.999.999-99
////////////////////////////////////////////////////////////////////////////////////
function FormataCpf(campo,tammax,teclapres) {
 var tecla = teclapres.keyCode;
  
 vr = event.srcElement.value;
 vr = vr.replace( "/", "" );
 vr = vr.replace( "/", "" );
 vr = vr.replace( ",", "" );
 vr = vr.replace( ".", "" );
 vr = vr.replace( ".", "" );
 vr = vr.replace( ".", "" );
 vr = vr.replace( ".", "" );
 vr = vr.replace( "-", "" );
 vr = vr.replace( "-", "" );
 vr = vr.replace( "-", "" );
 vr = vr.replace( "-", "" );
 vr = vr.replace( "-", "" );
 tam = vr.length;

 if (tam < tammax && tecla != 8){ tam = vr.length + 1 ; }

 if (tecla == 8 ){ tam = tam - 1 ; }
  
 if ( tecla == 8 || tecla >= 48 && tecla <= 57 || tecla >= 96 && tecla <= 105 ){
  if ( tam <= 2 ){ 
    event.srcElement.value = vr ; }
   if ( (tam > 2) && (tam <= 5) ){
    event.srcElement.value = vr.substr( 0, tam - 2 ) + '-' + vr.substr( tam - 2, tam ) ; }
   if ( (tam >= 6) && (tam <= 8) ){
    event.srcElement.value = vr.substr( 0, tam - 5 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ; }
   if ( (tam >= 9) && (tam <= 11) ){
    event.srcElement.value = vr.substr( 0, tam - 8 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ; }
   if ( (tam >= 12) && (tam <= 14) ){
    event.srcElement.value = vr.substr( 0, tam - 11 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ; }
   if ( (tam >= 15) && (tam <= 17) ){
    event.srcElement.value = vr.substr( 0, tam - 14 ) + '.' + vr.substr( tam - 14, 3 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ;}
 }  
}


function mascaraCEP (keypress, valorCEP) {
	caracteres = '01234567890';
	separacoes = 1;
	separacao1 = '-';
	conjuntos = 2;
	conjunto1 = 5;
	conjunto2 = 3;
	if ( (caracteres.search(String.fromCharCode (keypress))!=-1) 
        && (valorCEP.value.length < (conjunto1 + conjunto2 + 1)) ){
		if (valorCEP.value.length == conjunto1) 
		   valorCEP.value = valorCEP.value + separacao1;
	}
	else {
		event.returnValue = false;
	}
}


function ValidaCEP(s)
{
 var i;
 var c;
 var achou;

 if (s.value == "") return true;

 if (s.value.length != 8){ 
	s.focus();
	s.select();
	alert("CEP Inválido! Informe 8 digitos numéricos");
	return false;
 }

 achou = false;
 for (i=0; i<s.value.length; i++) {
 	 c = s.value.substring(i,i+1); 
     if ( (c == '-') || (c == '.') ){ 					
		s.focus();
		s.select();
		alert("CEP Inválido! Informe 8 digitos numéricos sem o traço e ponto");
		return false;
	 }
 }

}

function ValidaFone(s)
{
 var i;
 var c;
 var achou;
 
 if (s.value == "") return true;
 
 achou = false;
 for (i=0; i<s.length; i++) {
 	 c = s.substring(i,i+1); 
     if ( !isdigit(c) && (c != '-') ) 
	  	  return false;
     if (c == '-') {
	   if (!achou) 
			achou = true;
	   else 
			  return false;
	 }  	 	
 }
 return true;
}


function ValidaCPF(s)
{
	 var i;
	 var c;
	 var achou;
	
	 if (s.value == "") return true;
	
	 achou = false;
	 for (i=0; i<s.value.length; i++) {
		 c = s.value.substring(i,i+1); 
		 if ( (c == '-') || (c == '.') ){ 					
			s.focus();
			s.select();
			alert("CPF Inválido! Informe digitos numéricos sem o traço e ponto");
			return false;
		 }
	 }
	
	 if (valida_CPF(s) == false){
		 window.alert('CPF Inválido');
		 return false;
	 }

}


function valida_CPF(obj){
 s = obj.value;
 if (isNaN(s)) {
  return false;
 }
 var i;
 var c = s.substr(0,9);
 var dv = s.substr(9,2);
 var d1 = 0;
 for (i = 0; i < 9; i++) {
  d1 += c.charAt(i)*(10-i);
 }
 if (d1 == 0){
  return false;
 }         
    d1 = 11 - (d1 % 11);
    if (d1 > 9) d1 = 0;         
 if (dv.charAt(0) != d1) {
  return false;         
 }
 d1 *= 2;
 for (i = 0; i < 9; i++) {
  d1 += c.charAt(i)*(11-i);
 }
 d1 = 11 - (d1 % 11);
 if (d1 > 9) d1 = 0;
 if (dv.charAt(1) != d1) {
     return false;
    }
    return true;
}

function isdigit (c)
{   
return ((c >= "0") && (c <= "9"))
}

function valida_CNPJ(obj){
s = obj.value;

if (s == "") return true;

if (isNaN(s)) {
	obj.focus();
	obj.select();
	alert("CNPJ Inválido! Informe 14 digitos numéricos sem o traço e ponto");
	return false;
 }
 var i;
 var c = s.substr(0,12);
 var dv = s.substr(12,2);
 var d1 = 0;
 for (i = 0; i <12; i++){
  d1 += c.charAt(11-i)*(2+(i % 8));
 }
 if (d1 == 0) {
 	obj.focus();
	obj.select();
	alert("CNPJ Inválido!");
	return false;
 }

 d1 = 11 - (d1 % 11);
 if (d1 > 9) d1 = 0;
 if (dv.charAt(0) != d1){
	obj.focus();
	obj.select();
	alert("CNPJ Inválido!");
	return false;
 }
 d1 *= 2;
 for (i = 0; i < 12; i++){
  d1 += c.charAt(11-i)*(2+((i+1) % 8));
 }
 d1 = 11 - (d1 % 11);
 if (d1 > 9) 
  d1 = 0;
 if (dv.charAt(1) != d1){
	obj.focus();
	obj.select();
	alert("CNPJ Inválido! Digito verificador incorreto");
	return false;
}
 return true;
}

function ValidaAlphaMaiuscula(objCampo){
	var valido ;
	valido = true;
	ConverteMaiuscula(objCampo);
	valor = objCampo.value;
	var dominio = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÁÃÂÉÊÍÎÓÕÔÚÇ\/;,-()[]@";		
	for(c=0; c<valor.length; c++){
		mychar = valor.charAt(c);
		if(dominio.indexOf(mychar) == -1){
		   valido = false;
		   break;
		}
	}
	if ( valido != true ){
		alert('É permitido apenas o uso de letras,números,acentuação e alguns outros. Entretando, existe caracter desconhecido !');
		objCampo.focus();
		objCampo.select();
		return false;
	}else{
		return true
	}//if				
}//function

function ConverteMaiuscula(objCampo){
objCampo.value = objCampo.value.toUpperCase();
}
