// 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 resizebox_cms(){
	 var p=15;
	 if(navigator.appName.indexOf("Netscape") != -1){
//	     h=h-23;
     }
	     h=h-23;
	e1=document.getElementById("content_cms");
	var h1=getheight(e1);
    var h=Fensterhoehe()-getTop(e1);
	if(h1 < h){
	 p = h - h1;
	 document.getElementById("content_cms").style.height= h+'px';
	 document.getElementById("mitte_u_cms").style.top = p+ 'px';
	}
}

function resizebox_adm(){
	 document.getElementById("mitte_u_cms").style.height ='30px';
	 var p=15;
	 if(navigator.appName.indexOf("Netscape") != -1){
//	     h=h-23;
     }
	     h=h-23;
	e1=document.getElementById("content_cms");
	var h1=getheight(e1);
    var h=Fensterhoehe()-getTop(e1);
	if(h1 < h){
	 p = h - h1;
	 document.getElementById("content_cms").style.height= h+'px';
	 document.getElementById("mitte_u_cms").style.top = p+ 'px';
	}
}

    function zeige(src) {
	  document.getElementById("ac1").src = src;
	  document.getElementById("ab1").style.visibility="visible";
	  document.getElementById("ab1").style.height="400px";
	  document.getElementById("ab1").style.width="580px";
	  document.getElementById("ac1").style.height="385px";
	  document.getElementById("ac1").style.width="580px";
	  document.getElementById("ekopf").style.width="580px";
	};
    function zeige_gr(src, breite, hoehe) {
	  document.getElementById("ac1").src = src;
	  document.getElementById("ab1").style.visibility="visible";
	  document.getElementById("ab1").style.height=(hoehe+15)+"px";
	  document.getElementById("ab1").style.width=breite+"px";
	  document.getElementById("ac1").style.height=hoehe+"px";
	  document.getElementById("ac1").style.width=breite+"px";
	  document.getElementById("ekopf").style.width=breite+"px";
    };	
	function hide() {
    document.getElementById("ab1").style.visibility = "hidden";
   }

function getPosition(element){
  var elem=element,tagname="",x=0,y=0;
  while((typeof(elem)=="object")&&(typeof(elem.tagName)!="undefined")){
    y+=elem.offsetTop;     /* Offset des jeweiligen Elements addieren */
    x+=elem.offsetLeft;    /* Offset des jeweiligen Elements addieren */
    tagname=elem.tagName.toUpperCase(); /* tag-Name ermitteln, Grossbuchstaben */
    if((tagname=="HTML")||(tagname=="BODY"))
      elem=0;
    if (typeof(elem)=="object")
      if (typeof(elem.offsetParent)=="object"){
        elem=elem.offsetParent;
	  }
  }
  position=new Object();
  position.x=x;
  position.y=y;
  return position;
}

function getTop(element){
  var elem=element,tagname="",x=0,y=0;
  while((typeof(elem)=="object")&&(typeof(elem.tagName)!="undefined")){
    y+=elem.offsetTop;     /* Offset des jeweiligen Elements addieren */
    tagname=elem.tagName.toUpperCase(); /* tag-Name ermitteln, Grossbuchstaben */
    if((tagname=="HTML")||(tagname=="BODY"))
      elem=0;
    if (typeof(elem)=="object")
      if (typeof(elem.offsetParent)=="object"){
        elem=elem.offsetParent;
	  }
  }
  return y;
}

function getheight(elem){
  var h=0;
   h=elem.offsetHeight;     
   return h;
}

	
function w_scroll(id, wert){
 if(wert >0){
   var ty=document.getElementById(id).scrollTop;
   document.getElementById(id).scrollTop=ty+2;
   wert = wert -2;
   window.setTimeout( function(){ w_scroll(id,wert) }, 15);
 }
}	

function d_close(id, wert, wert1){
 if(wert >0){
   wert = wert -wert1;
   document.getElementById(id).style.height=wert+'px';
   document.getElementById(id).style.overflow='hidden';	 
   window.setTimeout( function(){ d_close(id,wert,wert1) }, 15);
 }
 else
 {
   document.getElementById(id).style.visibility='hidden';
 }
}	