//全局标志,0正在打开 1正在关闭
var genlanguageMenuMark=0;
//控制开关
function doSetLanguageMenu(name,num,step,old)
{
	//alert(name);
	//�?�得�?�柄
	var theMenu=document.all(name);
	var theMenuBottom=document.all("languagMenuBottom");
	var theMenuTop=document.all("languagMenuTop");
	
	var theNum = new Number(num);
	var theStep= new Number(step);
	var oldHeight= new Number(old);
	var maxHeight =(theNum-1)*theStep+oldHeight;
	
	//
	if(genlanguageMenuMark==0)
	{
		//如果高度已�?到最大高度 返回
		theMenuBottom.style.top = "-22px";
		if(theMenu.offsetHeight>= maxHeight)
		{
			theMenu.style.height= maxHeight;
			
			return;
		}
		theMenu.style.height= theMenu.offsetHeight+theStep/3;
	}
	else if(genlanguageMenuMark==1)
	{
		//如果高度已�?到原始高度 返回
		if(theMenu.offsetHeight<= oldHeight)
		{
			//�?�?显示的
			theMenuBottom.style.top = "0px";
			theMenu.style.display="none";
			
			//还原原�?�的
			theMenuTop.style.visibility="visible";
			return;
		}
		theMenu.style.height= theMenu.offsetHeight-theStep/3;
	}
	else
	{
		return;
	}
	var funName="doSetLanguageMenu('"+name+"','"+num+"','"+step+"','"+old+"')";
	setTimeout(funName,50);
	return;
}
function setLanguageMenu(mark,name,num,step,old)
{
	//�?�得�?�柄
	var theMenu=document.all(name);
	var theMenuBottom=document.all("languagMenuBottom");
	var theMenuTop=document.all("languagMenuTop");
	if(mark=="show")
	{
		//显示需�?的
		theMenu.style.display="block";
		//�?�?原�?�的
		theMenuTop.style.visibility="hidden";
		genlanguageMenuMark=0;
		var funName="doSetLanguageMenu('"+name+"','"+num+"','"+step+"','"+old+"')";
		setTimeout(funName,50);
	}
	else
	{
		genlanguageMenuMark=1;		
		var funName="doSetLanguageMenu('"+name+"','"+num+"','"+step+"','"+old+"')";
		setTimeout(funName,50);
	}
	
}