
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;
  }

document.getElementById("rauf").style.top = (ih_hoehe - 20) + "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 - 20) + "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 = '../bilder/2top_a.gif';
}

function EAG_out()
{
document.getElementById('top_pfeil').src = '../bilder/2top_p.gif';
}





// PopUp-Fenster
// Das grosse Bild heisst gleich wie die Vorschau, hat aber zusätzlich den Anhang «_gr»
// Das Script erwartet als grosses Bild ein JPG-File mit der Extension «.jpg»


function EAG_AutoFenster(welches)

{

var tn_bild = welches.src;
var bild = tn_bild.substring(0, (tn_bild.length - 7)) + "_gr.jpg";
var fensterstring = "auto_popup.htm?" + bild

window.open(fensterstring,'','width=100, height=100, scrollbars=no')

}


















