
function LynxData(desc){
	if(desc)this.desc = desc;
	this.rpls = new Array(
	[261,'$pla;'],[260,'$plA;'],[263,'$plc;'],[262,'$plC;'],[347,'$pls;'],[346,'$plS;'],
	[281,'$ple;'],[280,'$plE;'],[322,'$pll;'],[321,'$plL;'],[324,'$pln;'],[323,'$plN;'],
	[243,'$plo;'],[211,'$plO;'],[380,'$plz;'],[379,'$plZ;'],[378,'$plx;'],[377,'$plX;']
	);
}

LynxData.prototype.has = function(x){
	if(this[x]==undefined)return false;
	return true;
}

LynxData.prototype.set = function(x,val){
	this[x] = val;
}

LynxData.prototype.list = function(){
	var out = '';
	for(var i in this){
		out+=i+': '+this[i]+'\n';
	}
	alert(out);
}

LynxData.prototype.encode = function(data){
	for(var i in this.rpls){
		data = data.replace(new RegExp(this.rpls[i][0],"g"),this.rpls[i][1]);
	}
	return data;
}

LynxData.prototype.decode = function(data){
	for(var i in this.rpls){
		var src = this.rpls[i][1].replace(/\$/,"[$]");
		var reg = new RegExp(src,"g");
		data = data.replace(reg,String.fromCharCode(this.rpls[i][0]));
	}
	return data;
}
