/****** Slide Effekt ******************************/

self.onError=null;

currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; 
lastScrollY = 0;

OP = (window.opera) ? 1 : 0 ;
NS4 = (document.layers) ? 1 : 0;
NS6 = (document.getElementById && !document.all && !this.opera) ? 1 : 0;
IE = (document.all) ? 1: 0;

function GetDivObject(Div_ID)
{
/* MSIE, Konqueror, Opera : */
  if (window.document.all)
    return eval("window.document.all."+Div_ID+".style");

/* Netscape6/Mozilla : */
  if (typeof(window.document.getElementById)=="function")
    return window.document.getElementById(Div_ID).style;

/* uebrig bleibt Netscape4 : */
  return eval("window.document."+Div_ID);
}
 
function heartBeat() {

    if (window.innerWidth) {
		// NS4, NS6 and Opera
        diffX = window.pageXOffset;
        diffY = window.pageYOffset;
	} else if (document.documentElement && document.documentElement.clientWidth) {
		// IE6 in standards compliant mode
		diffX = document.documentElement.scrollLeft;
        diffY = document.documentElement.scrollTop;
	} else if (document.body) { 
		// IE4+
		diffX = document.body.scrollLeft;
        diffY = document.body.scrollTop;
	} else {
		diffX = 0;
		diffY = 0;
	}

	//window.status = diffX + " " + diffY + " " + lastScrollY + " " + lastScrollX;

	if (diffY != lastScrollY) {
	   lastScrollY=diffY;
		var x1 = GetDivObject("naviSlide");
		//var x2 = GetDivObject("firmen");
		if (IE) {
			x1.pixelTop = diffY;
			//x2.pixelTop = diffY;
		} else {
			x1.top = diffY + "px";
			//x2.top = diffY + "px";
		}
	}
}



if(NS6 || IE || OP) {
	action = window.setInterval("heartBeat()",1);
}
