function wezStyl(id) {
if (document.getElementById) return document.getElementById(id).style;
if (document.all) return document.all[id];
} 
var czas = 0;
var zaznaczone = new Array();
function najedzMysz(menuNr, itemNr) {
clearTimeout(czas);
schowajPrzyciski(menuNr);
zaznaczone = wezDrzewo(menuNr, itemNr);
zmienKolor(zaznaczone, true);
podmenuNr = menu[menuNr][itemNr].podmenu;
if (podmenuNr > 0) {
nowyX = parseInt(menu[menuNr][0].styl.left) + 			parseInt(menu[menuNr][itemNr].styl.left);
nowyY = parseInt(menu[menuNr][0].styl.top) + parseInt(menu[menuNr][itemNr].styl.top);
with (menu[podmenuNr][0].styl) {
left = parseInt(nowyX + menu[podmenuNr][0].x);
top = parseInt(nowyY + menu[podmenuNr][0].y);
visibility = 'visible'; }
	}
}
function zjedzMysz(menuNr, itemNr) {
if ((menuNr == 0) && !menu[menuNr][itemNr].podmenu)
schowajPrzyciski(0)
else
czas = setTimeout('schowajPrzyciski(0)', 500);
}
function wezDrzewo(menuNr, itemNr) {
tablica = new Array(menu.length);
while(1) {
tablica[menuNr] = itemNr;
if (menuNr == 0) return tablica;
itemNr = menu[menuNr][0].rodzicNrItem;
menuNr = menu[menuNr][0].rodzicNrMenu;
   }
}
function zmienKolor(tablica, na) {
for (i = 0; i < tablica.length; i++) {
if (tablica[i]) {
nowyKolor = na ? menu[i][0].zaznKolor : menu[i][0].staryKolor;
with (menu[i][tablica[i]].styl) {
backgroundColor = nowyKolor;}
      }
   }
}
function schowajPrzyciski(menuNr) {
var tablica = wezDrzewo(menuNr, 1);
for (i = 0; i < menu.length; i++)
if (!tablica[i]) menu[i][0].styl.visibility = 'hidden';
zmienKolor(zaznaczone, false);
}
function Menu(polozenie, x, y, szerokosc, zaznKolor, staryKolor, klasaRamka, klasaTekst) {
this.polozenie = polozenie;
this.x = x;
this.y = y;
this.width = szerokosc;
this.zaznKolor = zaznKolor;
this.staryKolor = staryKolor;
this.klasaRamka = klasaRamka;
this.klasaTekst = klasaTekst;
this.rodzicNrMenu = null;
this.rodzicNrItem = null;
this.styl = null;
}
function Item(text, href, frame, length, spacing, podmenu) {
this.text = text;
this.href = href;
this.frame = frame;
this.length = length;
this.spacing = spacing;
this.podmenu = podmenu;
this.styl = null;
}
function robMenu() {
for (i = 0; i < menu.length; i++) with (menu[i][0]) {
var str = '', itemX = 0, itemY = 0;
for (j = 1; j < menu[i].length; j++) with (menu[i][j]) {
var itemID = 'menu' + i + 'item' + j;
var w = (polozenie ? width : length);
var h = (polozenie ? length : width);
str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
if (staryKolor) str += 'background: ' + staryKolor + '; ';
str += '" ';
if (klasaRamka) str += 'class="' + klasaRamka + '" ';
str += 'onMouseOver="najedzMysz(' + i + ',' + j + ')" onMouseOut="zjedzMysz(' + i + ',' + j + ')">';
str += '<table width="' + (w - 8) + '" border="0" cellspacing="0" cellpadding="0"><tr><td align="left" height="' + (h - 7) + '">' + '<a class="' + klasaTekst;

if (navigator.appVersion.indexOf('MSIE 5.0')!=-1)
str += '" STYLE="font-variant : normal;';


str +='" href="' + href + '"' + (frame ? ' podmenu="' + frame + '">' : '>') + text + '</a></td>';
if (podmenu > 0) {
menu[podmenu][0].rodzicNrMenu = i;
menu[podmenu][0].rodzicNrItem = j;
}
str += '</tr></table></div>';
if (polozenie) itemY += length + spacing;
else itemX += length + spacing;
}
if (document.getElementById) {
var newDiv = document.createElement('div');
document.getElementsByTagName('body').item(0).appendChild(newDiv);
newDiv.innerHTML = str;
styl = newDiv.style;
styl.position = 'absolute';
styl.visibility = 'hidden';
}
if ((document.all) && !(document.getElementById)) {
document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + i + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '</div>');
styl = wezStyl('menu' + i + 'div');
} 
for (j = 1; j < menu[i].length; j++) {
itemName = 'menu' + i + 'item' + j;
menu[i][j].styl = wezStyl(itemName);
   }
}
with(menu[0][0]) {
styl.left = x;
styl.top = y;
styl.visibility = 'visible';
   }
}
var menu = new Array();
var domNowyKolor = '#D3E7ED', domStaryKolor = '#93C2D2';
var domLength1 = 17;
var domLength2 = 17;
menu[0] = new Array();
menu[0][0] = new Menu(true, 62, 240, 177, '#93C2D2', '#9BADB3', 'menuStylRamka', 'menuStylTekst');
menu[0][1] = new Item('O zakładzie', 'index.php', '', domLength2, 1, 0);
menu[0][2] = new Item('Seminarium', 'index.php?action=seminarium', '', domLength2, 1, 0);
menu[0][3] = new Item('Aktywność wydawnicza', 'index.php', '', domLength2, 1, 1);
menu[0][4] = new Item('Pracownicy', 'index.php', '', domLength2, 1, 2);
menu[0][5] = new Item('Dydaktyka', 'index.php?action=dydaktyka', '', domLength2, 1, 0);
menu[0][6] = new Item('Polecamy źródła', 'index.php', '', domLength2, 1, 3);
menu[0][7] = new Item('Forum', 'index.php?action=forum', '', domLength2, 1, 0);
menu[0][8] = new Item('Koło Studenckie', 'http://skk.amu.edu.pl/', '_blank', domLength2, 1, 0);

menu[1] = new Array();
menu[1][0] = new Menu(true, 180, 0, 480, domNowyKolor, domStaryKolor, 'itemStylRamka', 'itemStylTekst');
menu[1][1] = new Item('Poznan Studies in the Philosophy of the Sciences and the Humanities', 'http://poznanstudies.swps.edu.pl/index.html ', '_blank', domLength1, 1, 0);
menu[1][2] = new Item('Poznańskie Studia z Filozofii Humanistyki', 'index.php?action=studia_hum', '', domLength1, 1, 0);
menu[1][3] = new Item('Studia z Kognitywistyki i Filozofii Umysłu', 'index.php?action=studia_kogn', '', domLength1, 1, 0);
menu[1][4] = new Item('Wykłady z Filozofii dla Młodzieży', 'http://www.staff.amu.edu.pl/~insfil/mlodziez/welcome.htm', '_blank', domLength1, 1, 0);
menu[1][5] = new Item('Inne książki', 'index.php?action=ksiazki', '', domLength1, 1, 0);

menu[2] = new Array();
menu[2][0] = new Menu(true, 180, 0, 210, domNowyKolor, domStaryKolor, 'itemStylRamka', 'itemStylTekst');
menu[2][1] = new Item('Prof. Andrzej Klawiter', 'index.php?action=aklawiter', '', domLength1, 1, 0);
menu[2][2] = new Item('Prof. Leszek Nowak', 'http://www.staff.amu.edu.pl/~epistemo/', '_blank', domLength1, 1, 0);
menu[2][3] = new Item('Prof. Krzysztof Łastowski', 'index.php?action=klastowski', '', domLength1, 1, 0);
menu[2][4] = new Item('Dr Maciej Błaszak', 'index.php?action=mblaszak', '', domLength1, 1, 0);
menu[2][5] = new Item('Dr hab. Krzysztof Brzechczyn', 'index.php?action=kbrzechczyn', '', domLength1, 1, 0);
menu[2][6] = new Item('Dr Piotr Przybysz', 'index.php?action=pprzybysz', '', domLength1, 1, 0);
menu[2][7] = new Item('Doktoranci', 'index.php?action=doktoranci', '', domLength1, 1, 0);

menu[3] = new Array();
menu[3][0] = new Menu(true, 180, 0, 188, domNowyKolor, domStaryKolor, 'itemStylRamka', 'itemStylTekst');
menu[3][1] = new Item('E-czasopisma', 'index.php?action=czasopisma', '', domLength1, 1, 0);
menu[3][2] = new Item('Linki', 'index.php?action=linki', '', domLength1, 1, 0);
document.onclick = clickHandle;
function clickHandle(evt)
{ 
schowajPrzyciski(0);
}