function SubstituiCaractere(LcSvTexto,LcSvCharAnterior,LcSvCharNovo)
{
/**************************************************************************

	Substitui um caractere por outro em uma string.

	Parāmetros:
		LcSvTexto   -> Texto a ser alterado.
		LcSvCharAnterior -> Caractere a ser subtituido.
		LcSvCharNovo -> Novo caractere.

**************************************************************************/

	var LcSvCaractere = "" ;
	var LcSvNovoTexto = ""

    /**********************************************************
	*   Se string vazia.
	**********************************************************/
	if(LcSvTexto.length == 0 || LcSvTexto == "" || LcSvTexto == null)
	{
		return LcSvTexto ;
	}

    /**********************************************************
	*   Verifica cada caractere da string.
	**********************************************************/
	for(var i = 0;i < LcSvTexto.length;i++)
	{
		LcSvCaractere = LcSvTexto.substring(i,i+1) ;
		if(LcSvCaractere==LcSvCharAnterior)
		{
			LcSvNovoTexto = LcSvNovoTexto + LcSvCharNovo ;
		}
		else
		{
			LcSvNovoTexto = LcSvNovoTexto + LcSvCaractere ;
		}
	}

	return LcSvNovoTexto ;

}