function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
		return [curleft,curtop];
	}
}

function showDrop(id) {
	var theParent = document.getElementById('nav_' + id);
	var theTarget = document.getElementById('target_' + id);
	var parentPOS = findPos(theParent);

	var leftPos = parentPOS[0] + 0;
	var topPos = parentPOS[1] + 20;

	theTarget.style.left = leftPos + 'px';
	theTarget.style.top = topPos + 'px';
	theTarget.style.display = 'block';
	theTarget.style.position = 'absolute';
	theTarget.onmouseover = function(){showDrop(id);}
	theTarget.onmouseout = function(){closeDrop(id);}
	theParent.onmouseout = function(){closeDrop(id);}
}

function closeDrop(id) {
	var theTarget = document.getElementById('target_' + id);
	theTarget.style.display = 'none';
}
