	function getOffsetTop (el) 
	{ 
		var ot = el.offsetTop; 
		while((el = el.offsetParent) != null) ot += el.offsetTop; 
		return ot; 
	}
	
	function getOffsetLeft (el) 
	{ 
		var ot = el.offsetLeft; 
		while((el = el.offsetParent) != null) ot += el.offsetLeft; 
		return ot; 
	}		
		

	function setmenu(lay, item)
	{					
			 
	  var	el = document.all.item(item);
	  var y = getOffsetTop(el);
	  var x = getOffsetLeft(el);
	  
	  
  	 document.all.item(lay).style.width = el.offsetWidth + "px"
  	 document.all.item(lay).style.visibility = "visible";	
	 document.all.item(lay).style.left = x + "px";
	 document.all.item(lay).style.top = y+el.offsetHeight+ "px";
	  	
					  			  					  
	}
	
	function setclose(lay,item, val)
	{
	  var	el = document.all.item(item);
	    	 document.all.item(lay).style.visibility = "hidden";	
		el.value = val
	}