var idMenuAct = null;
var idTimeout = null;

function miMouseMove(mi, menuId)
{
	if (menuId != idMenuAct) {
		menuMouseLeave();
		idMenuAct = menuId;
		var menu = document.getElementById(menuId);
		var tabla = document.getElementById("principal");
		menu.style.left = tabla.offsetLeft + 30 + mi.width;
		menu.style.top = mi.offsetTop + 300;
		menu.style.display = "block";
		menu.style.width = menu.scrollWidth - 15;
		menu.style.height = menu.scrollHeight - 20;
	}
}
function miMouseLeave()
{
	idTimeout = setTimeout("menuMouseLeave()", 500);
}
function menuMouseEnter()
{
	if (idTimeout != null) {
		clearTimeout(idTimeout);
	}
	idTimeout = null;
}
function menuMouseLeave()
{
	if (idMenuAct != null) {
		var menu = document.getElementById(idMenuAct);
		menu.style.display = "none";
		idMenuAct = null;
		menuMouseEnter();
	}
}
function verOrganigrama()
{
	var ancho = screen.width - 200;
	var alto = screen.height - 200;
	window.open('../estructura/Organigrama.htm', 'organigrama', 'resizable, width=' + ancho + ', height=' + alto);
}
