﻿function resizeFlashArea( nHeight )
{   if(_timerId != null) 
	clearTimeout(_timerId);
	var browserName=navigator.appName;
	 if(browserName.charAt(0) == "M")
	 {
	  _target = document.getElementById('GNB');
	 }
	 else
	 {
		 _target  = document.getElementById('menu_Area') ;
	 }
  	_toHeight = nHeight;
	if(_menuHeight < nHeight)
	{
		_mode = "open";
		doDropDown();
	}
	else if(_menuHeight > nHeight)
	{
		_mode = "close";
		doDropDown();
	}
}

function doDropDown()
{
	if(_mode == 'open')
	{
		_menuHeight += _gap;
		if(_menuHeight >= _toHeight) {
			_menuHeight = _toHeight;
		}
	}
	else
	{
		_menuHeight -= _gap;
		if(_menuHeight <= _toHeight) {
			_menuHeight = _toHeight;
		}
	}
	_target.style.height = _menuHeight + 'px';
	
	
	if(_menuHeight != _toHeight)
		setTimeout(doDropDown, 30); // <-- 타이머의 동작 주기 예) 1000 - 1초마다 함수 호출 
}

