function BLCharEncode(string){
	if(typeof string=='string'){
		replace=Array();
		for(var i=0;i<string.length;i++){
			var char=string[i]
			var ord=string.charCodeAt(i);
			if((ord<48 || (ord<65 && ord>57) || ord>122 || (ord>90 && ord<97)) && ord!=124){
				replace[char]='|'+dechex(ord)+'|';
			}
		}
		for(char in replace){
			if(typeof replace[char]=='string'){
				if(char!='|'){
					while(string.indexOf(char)!=-1){
						string=string.replace(char,replace[char]);
					}
				}
			}
		}
	}
	return string;
}
function BLCharDecode(string){
	if(typeof string=='string'){
		var matches=Array();
		var chars=string.match(/\|[0-9a-f]{1,4}\|/g);
		for(index in chars){
			if(typeof chars[index]=='string'){
				var char=chars[index];
				code=char.substr(1,char.length-2);
					string=string.replace(char,String.fromCharCode(hexdec(code)));
			}
		}
	}
	return string;
}