var menu_aktywne="";
var aMenu=new Array();
var aWysokosci=new Array();
var czy_loaded=false;
function ShowHideMenu(kogo)
{	var tt = document.getElementById(kogo);
	if(tt.style.display=='')
	{	tt.style.display='none';
	}
	else
	{	if(menu_aktywne)
		{	var tta = document.getElementById(menu_aktywne);
		    tta.style.display='none';
		}
		tt.style.display='';
		menu_aktywne=kogo;
	}
}
function PageLoaded()
{	/*if(czy_loaded)
		return 0;
	if(aMenu.length)
	{	for(var i=0;i<aMenu.length;i++)
		{	//var tta = document.getElementById(aMenu[i]);
			//alert(tta.offsetHeight);
			//alert(aWysokosci[i]);
		}
		czy_loaded=true;
	}*/
}

function ShowHideMenuAni(kogo)
{	{	if(menu_aktywne)
		{	myFx = new Fx.Tween(menu_aktywne);
			myFx.start('height', '1');
		}
		if(menu_aktywne!=kogo)
		{	myFx = new Fx.Tween(kogo);
			myFx.start('height', GetWysokosc(kogo));
			menu_aktywne=kogo;
		}
		else
		{	menu_aktywne=0;
		}
	}
}
function GetWysokosc(id)
{	for(var i=0;i<aMenu.length;i++)
	{	if(id==aMenu[i])
			return aWysokosci[i];
	}
	return 0;
}
function ShowHideOld(kogo)
{	var tt = document.getElementById(kogo);
	if(tt.style.display=='')
		tt.style.display='none';
	else
		tt.style.display='';
}
function ShowHide(kogo)
{	var ms = new Fx.Slide(kogo).toggle();
	//new Fx.Slide($$("#submenu")).toggle();
}
function __ShowPopupRoz(url,width,height) 
{	var okienko = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=no,menubar=no,status=no' );
}
function __ShowPopup(url) 
{	var okienko = window.open(url,"displayWindow",'width=300,height=300,resizable=1,scrollbars=no,menubar=no,status=no' );
}
function SetKolor(to,kolor)
{	to.style.backgroundColor=kolor;
}
function SetMenu(indeks,id,wys)
{	aMenu[indeks]=id;
	aWysokosci[indeks]=wys;
}

