// JavaScript MyMenu DK


var myTabSelected = Object();
	myTabSelected.timer = null;
	myTabSelected.objectId = null;

function myMenuTabMouseOver(tabDiv,tabId,h) {
	showMyTabListMenu(tabDiv,tabId,h);
}

function myMenuTabMouseOut(tabDiv,tabId) {
	myTabSelected.timer = setTimeout(hideMyTabListMenu,200);
}

function myMenuTabDivMouseOver() {
	if(myTabSelected.timer) { clearTimeout(myTabSelected.timer); }
}

function myMenuTabDivMouseOut() {
	myTabSelected.timer = setTimeout(hideMyTabListMenu,100);
}


function showMyTabListMenu(tabDiv,tabId,h) {
	h=22;
 	if(myTabSelected.timer) { clearTimeout(myTabSelected.timer); myTabSelected.timer = null; hideMyTabListMenu(); }
	var pn = tabDiv;
	var xy = YAHOO.util.Dom.getXY(pn);
		
	var menu = document.getElementById(tabId);	
	if(typeof(xy) != "undefined") {
		menu.style.position = "absolute";
		menu.style.left = (xy[0]-1)+'px';
		menu.style.top = (xy[1]+h)+'px';
		document.getElementById(tabId).style.left = 50;
	}
	
	menu.style.display = '';
	myTabSelected.objectId = tabId;
}

function hideMyTabListMenu() {
	if(myTabSelected.objectId) {
		var menu = document.getElementById(myTabSelected.objectId);
		menu.style.display = 'none';
		myTabSelected.objectId = null;
	}
}
