hrcLM = function(id) {
	this.id = id;
	this.cBlock = null;
	this.aBlock = null;
	this.params = { open : 0, anime : false, show : false, aTimer : false, cTimer : false, height : 0 };
	hrcLM.links[id] = this;
	window.setTimeout('hrcLM.links[\'' + this.id + '\'].init()', 10);
}

hrcLM.links = [];

hrcLM.closeAll = function() {
	document.tilte = hrcLM.links.length;
//	if (hrcLM.links && (hrcLM.links.length > 0))
		for (var id in hrcLM.links)	hrcLM.links[id].close();
}

hrcLM.prototype.init = function() {
	hrcLM.links[this.id].cBlock = document.getElementById(this.id);
	hrcLM.links[this.id].aBlock = document.getElementById(this.id + 'Anime');
}

hrcLM.prototype.show = function() {
	if (this.params.show || this.params.anime || !this.cBlock || !this.aBlock) return false;
	hrcLM.closeAll();
	this.cBlock.style.display = '';
	this.params.height = parseInt(this.cBlock.offsetHeight);
	this.params.open = 0;
	var cbAP = hrcLM.absolute(this.cBlock);
	this.aBlock.style.left = cbAP.x;
	this.aBlock.style.top = cbAP.y;
	this.aBlock.style.width = parseInt(this.cBlock.offsetWidth);
	this.aBlock.style.position = 'absolute';
	this.aBlock.style.clip = 'rect(auto auto 0 auto)';
	
	this.cBlock.style.height = this.params.height;
	this.anime();
}

hrcLM.prototype.anime = function() {
	this.params.anime = true;
	this.params.open += 4;
	this.aBlock.style.clip = 'rect(auto, auto, ' + this.params.open + ', auto)';
	if (this.params.open < this.params.height)
		this.params.aTimer = window.setTimeout('hrcLM.links[\'' + this.id + '\'].anime()', 15);
	else {
		this.aBlock.style.position = 'static';
		this.cBlock.style.height = 'auto';
		this.params.show = true;
		this.params.anime = false;
//		this.params.cTimer = window.setTimeout('hrcLM.links[\'' + this.id + '\'].close();', 5000);
	}
}

hrcLM.prototype.close = function() {
	window.clearTimeout(this.params.aTimer);
	this.cBlock.style.display = 'none';
	this.params.show = false;
	this.params.anime = false;
}

hrcLM.absolute = function(oObject) {
	var oPos = { x : oObject.offsetLeft, y : oObject.offsetTop };
	if (oObject.offsetParent) {
		var oTemp = hrcLM.absolute(oObject.offsetParent);
		oPos.x += oTemp.x;
		oPos.y += oTemp.y;
	}
	return oPos;
}

hrcLM.hoverLink = function(id, oper) {
	var ena = document.getElementById(id);
	if (ena) {
		if (oper > 0) ena.className = 'ahover';
		else ena.className = '';
	}
}