	var menuToHide = 0;
    var imageToMove = 0;

	function showDropDown(obj, id)
	{
		var menu = $('moveToGalMnu');
		
		imageToMove = id;
		
		var imgContainer = $('img_' + id);
		
		imgContainer.insert({after: menu});
		
		var coords = findPos(obj);
		
		menu.setStyle({
			'top':  (coords[1] + 15) + 'px',
			'left': (coords[0] - 60) + 'px'
		});
		
		menu.show();
	}

	function hideId()
	{
		$('moveToGalMnu').hide();
	}

	function resetHides()
	{
		menuToHide = 0;
	}
	
	function hideCheck()
	{
		//here we check if we really need to hide this menu 
		//(e.g. the action can be canceled if the user navigates
		//the mouse cursor over the links of the menu)
		if(imageToMove == menuToHide)
		{
			$('moveToGalMnu').hide();
		}
	}
	
	function hideDropDown()
	{
		menuToHide = imageToMove;
		setTimeout('hideCheck()', 2000);		
	}
	
	//helper for finding the menu pos
	function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		return [curleft,curtop];
	}
