var _timeOut;
var _parent;
var _menuID;

function einblenden(parent, menuID) {
	_parent = parent;
	_menuID = menuID;
	_timeOut = window.setTimeout('einblendenDelayed()', 200);
}
 
function einblendenDelayed() {
  	var minWidth = 220;
  	var parentTopLeft = Coordinates.northwestOffset(_parent, true);
  	var parentBottomRight = Coordinates.southeastOffset(_parent, true);
    var menuList = getObject(_menuID);
    var width = parentBottomRight.x - parentTopLeft.x;
    if (width < minWidth) {
	    menuList.style.width = minWidth + 2;
    	if (parentBottomRight.x  > 800) {
		    menuList.style.left = parentBottomRight.x - minWidth -2;
    	}
    	else
		    menuList.style.left = parentTopLeft.x - 2;
    } else {
	    menuList.style.width = width + 2;
	    menuList.style.left = parentTopLeft.x-2;
    }
    menuList.style.top = parentBottomRight.y - 1;
    menuList.style.visibility      = "visible"; 
    menuList.innerHTML += '.';
}

function ausblenden(menuID) {
    window.clearTimeout(_timeOut);
	_menuID = null;
	_parent = null;
    var menu = getObject(menuID);
    menu.style.visibility = "hidden";
}
