var menuHeight=new Array(10,10,10,10,10);
var menuActive=new Array(document.getElementById('50'),document.getElementById('51'),document.getElementById('52'),document.getElementById('53'),document.getElementById('54'));
var menuMaxHeight=new Array(100,100,100,100,100);
var goDown=new Array();
var goUp=new Array();
var step=6;
var speed=0;

function openMenu(menu)
{
	menu=menu-50;
	clearTimeout(goUp[menu]);
	menuGoDown(menu);
}
function closeMenu(menu)
{
	menu=menu-50;
	clearTimeout(goDown[menu]);
	menuGoUp(menu);
		
}

function menuGoDown(menu)
{
	if (menuHeight[menu]<menuMaxHeight[menu])
	{
		menuActive[menu].style.height=menuHeight[menu];	
		menuHeight[menu]=menuHeight[menu]+step;
		goDown[menu]=setTimeout("menuGoDown("+menu+")",speed);
	}
}

function menuGoUp(menu)
{
	if (menuHeight[menu]>9)
	{
		menuActive[menu].style.height=menuHeight[menu];	
		menuHeight[menu]=menuHeight[menu]-step;
		goUp[menu]=setTimeout("menuGoUp("+menu+")",speed);
	}
	
}
function cancelTab()
{
	if	(event.keyCode==9)
		return false;
}

document.onkeydown = cancelTab




