//April 4, 2006

//*******************************************************************************'
//Function to remove characters passed in and replace with nothing

function replaceChar(strExpression, strReplace, strReplaceWith) //as String
{
	//create a temporary instance of the string
	var strTmp = strExpression;
	var intPos = 0;

	//while we still find "strRepalce" in strTmp...
	while (strTmp.indexOf(strReplace) > -1)
	{
		//save the position where its at
		intPos = strTmp.indexOf(strReplace);
		
		//replace this instance
		strTmp = "" + (strTmp.substring(0, intPos) + strReplaceWith + strTmp.substring((intPos + strReplace.length), strTmp.length));
	}
	
	//return the new string
	return strTmp;
}

//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'
//syntax version

function replacechar(strExpression, strReplace, strReplaceWith) //as String
{
	return replaceChar(strExpression, strReplace, strReplaceWith)
}

//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'
//syntax version

function ReplaceChar(strExpression, strReplace, strReplaceWith) //as String
{
	return replaceChar(strExpression, strReplace, strReplaceWith)
}
