function selChanged(sel) {
	var text = sel.textObj;
	text.value = sel.options[sel.selectedIndex].value;
	if( text.value == "" ) {
		text.value = sel.options[sel.selectedIndex].text;
	}
//	  sel.selectedIndex = -1;
}

// function getDimensions(obj){
// 	var _width	= obj.offsetWidth;
// 	var _height = obj.offsetHeight;
// 	var _top = 0, _left = 0;
// 	for (; obj != null; obj = obj.offsetParent) {
// 		_top += obj.offsetTop;
// 		_left += obj.offsetLeft;
// 	}
// 	return {top:_top, left:_left, width:_width, height:_height};
// }

// Ver 3.8.9.2 (2007/07/13) setTimeout 100 -> 200 ms
function makeInputMenu(id) {
	var text = document.getElementById(id);
	var sel  = document.getElementById(id+".sel");

	var tid;
	//if( text.offsetWidth == 0 ) {
	if( !text.setSel ) {
		text.setSel = true;
		tid = setTimeout( "makeInputMenu('" + id + "')",200 );	// 100 -> 200 ms
		return ;
	}
	// 2009/06/09 - Comment Out
	//clearTimeout( tid );

	var w = text.offsetWidth - 15 + "px";
	sel.style.position = "absolute";		// JyunBAN ga Jyuyo
	sel.style.width  = text.offsetWidth + "px";
	sel.style.height = text.offsetHeight + "px";
	var dim  = getDimensions(text);
	var dim2 = getDimensions(sel.offsetParent);
	sel.style.left = dim.left - dim2.left + "px";
	sel.style.top  = dim.top  - dim2.top + "px";
	sel.style.clip = "rect(auto auto auto "+w+")";
	sel.textObj = text;
	sel.selectedIndex = -1;
}
