
var menuList = {};
menuList.getElement = function(id) {
	if (this[id]) {
		if (this[id].timeoutHandle) {
			clearTimeout(this[id].timeoutHandle);
			this[id].timeoutHandle = null;
		}
		return this[id].menu;
	} else {
		var tag = document.getElementById(id);
		this[id] = new menuTimeout(tag);
		return tag;
	}
}
menuList.hideElement = function(id) {
	if (this[id] && !this[id].timeoutHandle) {
this[id].menu.style.display = 'none';
		//this[id].timeoutHandle = setTimeout('document.getElementById(\'' + id + '\').style.display = \'none\'',500);
	}
}
function menuTimeout(menu) {
	this.menu = menu;
	this.timeoutHandle = null;
}
function menuOver(obj) {
	//var tag = menuList.getElement(obj.id + '_Sub');
	var tag = document.getElementById(obj.id + '_Sub');
	if (tag) {
		tag.style.display = 'block';
		tag.style.left = (getLeft(obj)) + 'px';
		tag.style.top = (getTop(obj) + obj.offsetHeight) + 'px';
	}
}
function menuOut(obj) {
	var tag = document.getElementById(obj.id + '_Sub');
	if (tag) {
		tag.style.display = 'none';
		//menuList.hideElement(obj.id + '_Sub');
	}
}

function getTop(tag) {
	if (tag)
		return tag.offsetTop + getTop(tag.offsetParent);
	else
		return 0;
}
function getLeft(tag) {
	if (tag)
		return tag.offsetLeft + getLeft(tag.offsetParent);
	else
		return 0;
}




