function GL_checkBrowser(){
	this.dom= (document.getElementById);
	this.op=this.opera= (navigator.userAgent.indexOf("Opera")>-1);
	this.konq=  (navigator.userAgent.indexOf("Konq")>-1);
	this.firefox =  (navigator.userAgent.indexOf("Firefox")>-1);
	this.ie4= (document.all && !this.dom && !this.op && !this.konq);
	this.ie5= (document.all && this.dom && !this.op && !this.konq);
	this.ns4= (document.layers && !this.dom && !this.konq);
	this.ns5= (!document.all && this.dom && !this.op && !this.konq);
	this.ns6= (this.ns5);
	this.fire = (document.all && this.firefox && this.dom && !this.op && !this.konq);
	this.bw=  (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq || this.fire);
	return this;
}
bw= new GL_checkBrowser();

function GL_getObj(obj){
//	nest= (!nest)?"":"document."+nest+".";
	nest="";
	this.el= bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document."+obj):document.getElementById(obj);	
   this.css= bw.ns4?this.el:this.el.style;
	this.ref= bw.ns4?this.el.document:document;		
	this.x= (bw.ns4||bw.op)?this.css.left:this.el.offsetLeft;
	this.y= (bw.ns4||bw.op)?this.css.top:this.el.offsetTop;
	this.height= (bw.ie4||bw.ie5||bw.ns6)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.op?this.css.pixelHeight:0;
	this.width= (bw.ie4||bw.ie5||bw.ns6)?this.el.offsetWidth:bw.ns4?this.ref.width:bw.op?this.css.pixelWidth:0;
	return this;
}

sticky=GL_getObj("stickymenu");

	

        lastScrollY = 0;

      	position_start=150;
			position=sticky.css.top;
			position=position.substr(0,position.indexOf('px'));
			position=parseInt(position);
			

        function abstand()
        {
        			diffY=0;
                if (document.body.scrollTop) { diffY = document.body.scrollTop; }
                if (self.pageYOffset) { diffY = self.pageYOffset; }
                if (document.getElementsByTagName("body") [0] .scrollTop) { diffY =  document.getElementsByTagName("body") [0] .scrollTop; }
					
                if (diffY != lastScrollY) {
                          percent = 0.1 * (diffY - lastScrollY);
                         
                          if (percent > 0) percent = Math.floor(percent);
                          else percent = Math.ceil(percent);
                          
                          position = position + percent;
                          sticky.css.top = position;
                          lastScrollY = lastScrollY + percent;
            }
        }

         action = window.setInterval("abstand()",5);
       
