var getMaxHeight = parseInt(window.innerHeight);

if (document.body.clientHeight>900 && getMaxHeight>600) {


    gora=10
    reakcja=300
    szybkosc=6
    
    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)
    
     if (oBy>300 && oBy<document.getElementById('contentTextID').offsetHeight-100) {
     getEl('flMenu').style.paddingTop=Math.round(oBy)-285+'px'
    
     if(Math.round(oBy)!=celY)anim=setTimeout("menuGo()",20); else { anim=0 }
     } else { getEl('flMenu').style.paddingTop='0px'; anim=0 }
    
    }
    function scrLay() {
     var pYoff=(d.a&&!window.opera)?document.body.scrollTop:window.pageYOffset
    // if (pYoff<document.getElementById('contentTextID').offsetHeight-200)
     if (pYoff<document.getElementById('contentTextID').offsetHeight-100)
     if(parseInt(getEl('flMenu').style.paddingTop)!=pYoff+gora)Namiar(pYoff+gora)
    }
    function initMenu(){
    
     d=document, d.l=d.layers, d.a=d.all, d.g=d.getElementById
     oBy=gora, anim=0
     setInterval('scrLay()',reakcja)
    }
    window.onload=initMenu()


}