/* Date de création: 02/12/2003 */

	function RemoveWhiteSpace() {
		return this.replace(/\s/g,' ');
	}

	function RemoveSpaces() {
		return this.replace(/  */g,' ');
	}

	function RemovePipe() {
		return this.replace(/\|/g,' ');
	}

	function StrTrim() {
		return this.replace(/^\s+/,'').replace(/\s+$/,'');
	}

	function RemoveDollarSignStr() {
		return this.replace('$', '');
	}

	String.prototype.Clean = RemoveWhiteSpace;
	String.prototype.StripPipe = RemovePipe;
	String.prototype.InnerTrim = RemoveSpaces;
	String.prototype.Trim = StrTrim;
	String.prototype.RemoveDollarSign = RemoveDollarSignStr;


	function RemoveSpecChars(Field){
			var FieldValue = Field.value;
			if (FieldValue.length > 0)  {
				FieldValue = FieldValue.Clean();
				FieldValue = FieldValue.StripPipe();
				FieldValue = FieldValue.InnerTrim();
				FieldValue = FieldValue.Trim();
				Field.value = FieldValue;
			}
	}
function RemoveSpecCharsFromForm(FormName){
	if (document.forms[FormName].elements.length > 0){
		for (var i=0;i < document.forms[FormName].length; i++){
			if (document.forms[FormName].elements[i].type == 'text'){
				RemoveSpecChars(document.forms[FormName].elements[i]);
			}
		}
	}
}


