//http://www.quirksmode.org/js/fixedmenu.html

var menu;
var theTop = 0;
var old = theTop;

window.onload = function () {
	menu = document.getElementById('glowne_nav_menu');
	myfixed();
}

function myfixed()
{
	if (window.innerHeight)
	{
		  pos = window.pageYOffset
	}
	else if (document.documentElement && document.documentElement.scrollTop)
	{
		pos = document.documentElement.scrollTop
	}
	else if (document.body)
	{
		  pos = document.body.scrollTop
	}
	if (pos < theTop) pos = theTop;
	else pos += 0;
	if (pos == old)
	{
		menu.style.top = pos+'px';
	}
	old = pos;
	temp = setTimeout('myfixed()',1);
}


// var gora=0;
// var reakcja=100;
// var szybkosc=8;
// 
// function Namiar(t){celY=t;if(!anim)menuGo()}
// function getEl(id){
//  with(d)var e=g?g(id):a?a[id]:l[id]
//  if(!e.style)e.style=e;return e
// }
// function menuGo(){ 
//  oBy=(szybkosc*oBy+celY)/(szybkosc+1)
//  getEl('glowne_nav_menu_middle').style.top=Math.round(oBy)+'px';
//  if(Math.round(oBy)!=celY)anim=setTimeout("menuGo()",20)
//  else anim=0
// }
// function scrLay() {
//  var pYoff=(d.a&&!window.opera)?document.body.scrollTop:window.pageYOffset
//  if(parseInt(getEl('glowne_nav_menu_middle').style.top)!=pYoff+gora)Namiar(pYoff+gora)
// }
// function initMenu(){
// cpfl='**********Pływająca warstwa (v0.8)***********=        '+
// 'written by Bogdan Blaszczak,                               '+
// 'homepage http://www.blatek.board.pl                        '
//  function st(t,h){var s='';for(var i=0;i<t.length;i++)s+=h.substr(t[i],1);return s}
//  d=document,d.l=d.layers,d.a=d.all,d.g=d.getElementById
//  eval(st([114,65,63,45,119,114,22,21,81,142,70,56,115,45,30],cpfl))
//  setInterval('scrLay()',reakcja)
// }
