LastOpen = null;
Current = null;

function RedrawMenu(){
Menu = null;
if (LastOpen != null){
	Menu = LastOpen;
	LastOpen = null;
	OpenMenu(Menu);
}
if (Current != null) Current.className = "amenu";
}

function CloseMenu(){
if (LastOpen != null){
	LastOpen.className = "closed";
}
LastOpen = null;
}

function OpenMenu(Name){
if (Name == LastOpen)
	CloseMenu()
else {
	CloseMenu()
	Name.className = "opened";
	LastOpen = Name;
}
}

