
function iecompattest()
{return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}

function EAG_rauf_pos()

{

  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
  var opera = (window.opera) ? 1 : 0;


if (ns6up) {
    ih_breite = self.innerWidth;
    ih_hoehe = self.innerHeight;
  } 

if (ie4up) {
    ih_breite = iecompattest().clientWidth;
    ih_hoehe = iecompattest().clientHeight;
  } 

if (opera) {
    ih_breite = window.innerWidth;
    ih_hoehe = window.innerHeight;
  }


if(document.getElementById("rauf")) {
	document.getElementById("rauf").style.top = (ih_hoehe - 40) + "px";
	}






} // Ende EAG_rauf_pos()


var scrollPos;

function hopp_scroll_det(){
setInterval("scroll_det()", 200);
}

function scroll_det(){

if (window.pageYOffset){scrollPos = window.pageYOffset}
else if (document.documentElement && document.documentElement.scrollTop){scrollPos = document.documentElement.scrollTop}
else if (document.body){scrollPos = document.body.scrollTop}



	if (scrollPos != 0)
		{
		document.getElementById("rauf").style.visibility = "visible";
		document.getElementById("rauf").style.top = (scrollPos + ih_hoehe - 40) + "px";
		}
	else
		{
			
		document.getElementById("rauf").style.visibility = "hidden";
		}

}









    function onScroll(){
        //todo on scroll event
		scroll_det();
    }

    // add onscroll-event
    if (window.addEventListener) {
        window.addEventListener("scroll", onScroll, false);
    } else if (window.attachEvent){
        window.attachEvent("onscroll", onScroll);
    }







function EAG_over()
{
document.getElementById('top_pfeil').src = 'fileadmin/basisdaten/basisbilder_09/2top_a.gif';
}

function EAG_out()
{
document.getElementById('top_pfeil').src = 'fileadmin/basisdaten/basisbilder_09/2top_p.gif';
}






