var timerID = "";

function menu_drop(menuID, dropID, xoffset, yoffset) {
	mymenu = document.getElementById(menuID);
	drop = document.getElementById(dropID);
	var y = 0; 
	var x = 0;
	
	drop.style.display="block";
	
	var myWidth = drop.offsetWidth;
	var myHeight = drop.offsetHeight;
	
	/*drop.style.clip='rect('+myHeight+'px auto auto auto)';*/
	
	if (myWidth < 140) {
		drop.style.width="140px";
	}
	
	tmpmenu = mymenu;
	while (tmpmenu) { 
		x += tmpmenu.offsetLeft; 
		tmpmenu = tmpmenu.offsetParent; 
	}
	
	tmpmenu = mymenu;
	while (tmpmenu) { 
		y += tmpmenu.offsetTop; 
		tmpmenu = tmpmenu.offsetParent; 
	} 
	
	tmpmenu = mymenu;
	y += tmpmenu.offsetHeight;
	x += xoffset;
	y += yoffset;

	drop.style.left=x + "px";
	drop.style.top=y + "px";
	
	/*timerID = setTimeout("menu_slide("+myHeight+", "+dropID+")", 50);*/
}

function menu_slide(inHeight, dropID) {
	myHeight = inHeight - 1;
	
	if (myHeight >= 0) {
		drop = document.getElementById(dropID);
		drop.style.clip='rect('+myHeight+'px auto auto auto)';
		timerID = setTimeout("menu_slide("+myHeight+", "+dropID+")", 50);
	}
}

function menu_close(objID) {
	obj = document.getElementById(objID);
	obj.style.display="none";
}