/* Класс для работы с клиентским кэшем */
function __Cache()
{
	this.data = {};
	this.last = '';
}

__Cache.prototype.add = function(sectionId, blockId, data)
{
	if(!this.data[sectionId]) this.data[sectionId] = {};
	this.data[sectionId][blockId] = data;
	return true;
}

__Cache.prototype.get = function(sectionId, blockId)
{
	var t = false;
	if(t = this.data[sectionId][blockId])
	{
		this.last = t;
	}
	return t;
}

__Cache.prototype.remove = function(sectionId, blockId)
{
	if(this.data[sectionId][blockId])
	{
		delete this.data[sectionId][blockId]
		return true;
	}
	return false;
}

gCache = new __Cache();