// JavaScript Document
function fenster(NeueBreite, NeueHoehe)
{
    window.resizeTo(NeueBreite, NeueHoehe);
    window.moveTo((screen.availWidth-NeueBreite)/2, (screen.availHeight-NeueHoehe-60)/2);
}
function Fensterbreite () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function Fensterhoehe () {
var hoehe=0;
if (self.innerHeight)
{
   hoehe = self.innerHeight;
}

// Explorer 6 Strict Mode
else if (document.documentElement && document.documentElement.clientHeight)

{
        hoehe = document.documentElement.clientHeight;
}

// andere Explorers
else if (document.body)
{
        hoehe = document.body.clientHeight;
}
return hoehe;
}

function get_top(e)
{
var o = document.getElementById(e);	
if(!o.offsetTop) return;
var top = 0;
while (o)
{
   top += parseInt(o.offsetTop );
   o = o.offsetParent;
}
return top;
}


function resizebox(){
     var h=Fensterhoehe()-199;
     if(get_top("mitte_u")){
	   if(Fensterhoehe()-get_top("mitte_u") > 20){	 
//	     alert(get_top("mitte_u")+'--'+ Fensterhoehe());
		 var h1=Fensterhoehe();
	     document.getElementById("content").style.height= h+'px';
	     document.getElementById("inhalt").style.height= h1+'px';
	     document.getElementById("inhalt").style.overflow= 'hidden';		 
	   }
	   else
	   {
		 var h1=get_top("mitte_u")+20;
	     document.getElementById("inhalt").style.height= h1+'px';
	     document.getElementById("inhalt").style.overflow= 'hidden';		 
	   }
	}
}
    function zeige_gr(src, breite, hoehe) {
     var topf=0;
     topf=Math.round((Fensterhoehe()-hoehe)/2);
     if(topf < 0){
       topf=0;
     }
	 topf=topf+getScrollY();
	  document.getElementById("ekopf").style.width=breite+"px";
	  document.getElementById("abr").style.top = topf+"px";
	  document.getElementById("abr").style.visibility="visible";
	  document.getElementById("abt").style.visibility="visible";
	  document.getElementById("abt").style.height=getheight(document.getElementById("inhalt"))+"px";	  
	  document.getElementById("ac1").src = src;
	  document.getElementById("ab1").style.visibility="visible";
	  document.getElementById("ab1").style.height=(hoehe+35)+"px";
	  document.getElementById("ab1").style.width=breite+"px";
	  document.getElementById("ac1").style.height=hoehe+"px";
	  document.getElementById("ac1").style.width=breite+"px";
    };	
    function hide() {
    document.getElementById("ab1").style.visibility = "hidden";
	  document.getElementById("abr").style.visibility="hidden";
	  document.getElementById("abt").style.visibility="hidden";
      document.getElementById("ac1").src="";
	  document.getElementById("ab1").style.height="0px";
	  document.getElementById("ab1").style.width="0px";
   }
function getScrollY() {
var x,y;
if (self.pageYOffset) // all except Explorer
{
	y = self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
	// Explorer 6 Strict
{
	y = document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
	y = document.body.scrollTop;
}
    return y;
}
function getheight(elem){
  var h=0;
   h=elem.offsetHeight;     
   return h;
}