// JavaScript Document

    var DHTML = (document.getElementById ||
                 document.all ||
                 document.layers);
    var menuh;
    var Scroll = true;
    var lastScrollY = 0;
    var percent;
    var winpos = 110;
	//var leftMargin = 176;
	//var windowWidth =0; 

function init() {

    if(!DHTML) return;
    menuh = new nimmObj('menu');
	menuh.style.position="absolute";
	//if (document.width) leftMargin=Math.floor((document.width-650)/2);
	if (document.body.offsetWidth) windowWidth=document.body.offsetWidth;
	if (document.width) windowWidth=document.width;
	if (windowWidth) leftMargin=Math.floor((windowWidth-650)/2);
	//menuh.style.left = (-170+leftMargin)+"px";
	LaufDuSau();
}

function LaufDuSau() {
    
        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;
        }

// www.webwal.de, für meine Bedürfnisse angepaßt

        pos+=0;
        if (pos <= 50) pos = 50;
        if (pos > 50) pos += 10;
        if (pos != lastScrollY) {
            percent = .03 * (pos - lastScrollY);
            if (percent > 0) {
                percent = Math.ceil(percent);
            } else {
            percent = Math.floor(percent);
            }

            winpos = winpos + percent;
            menuh.style.top = winpos+ "px";
            lastScrollY = lastScrollY + percent;

        }


// Ende webwal
    
    temp = window.setTimeout('LaufDuSau()',10);
}

function nimmObj(name) {
    if (document.getElementById) {
        this.obj = document.getElementById(name);
        this.style = document.getElementById(name).style;
    } else if (document.all) {
        this.obj = document.all[name];
        this.style = document.all[name].style;
    } else if (document.layers) {
        this.obj = document.layers[name];
        this.style = document.layers[name];
    }
}
