/* DHTML-Bibliothek */

var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;

function DHTML_init() {

 if (window.opera) {
     OP = 1;
 }
 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all && !OP) {
   DHTML = 1;
   MS = 1;
 }
if(document.layers && !OP) {
   DHTML = 1;
   NS = 1;
 }

}

DHTML_init();

function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function Fensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


function neuAufbau()
{
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
 {
 //window.history.go(0);
   if (DOM)  //NS 6.x IE 5.x
   {
     document.getElementById("corpus").style.backgroundImage = "url(./pics/wappen_bg.gif)";
     document.getElementById("corpus").style.backgroundRepeat = "no-repeat";
     document.getElementById("corpus").style.backgroundAttachment ="fixed";
     var str = String((Fensterweite()/2) - 260);
     str = str.concat(" ").concat(String((Fensterhoehe()/2) - 212));
     document.getElementById("corpus").style.backgroundPosition = str ;
     document.all.corpus.style.backgroundposition="middle center";

   	
   } else
   {  
   	if (NS) {  //Netscape 4.x
   		document.layers["NSHintergrund"].visibility= "show";
   		document.layers["NSHintergrund"].left = (Fensterweite()/2) - 267;
   		var t = ((Fensterhoehe()-100)/2) - 212 + window.pageYOffset;
      	        if (t<0) 
      	            t = 0 ;
      	        document.layers["NSHintergrund"].top = t;
   	        document.layers["NSHintergrund"].zindex = 0;
   		document.layers["inhaltns"].zindex=1
        }       // Netscape 4.X  
   }
 }
}


/*Überwachung von Netscape initialisieren*/
if(!window.Weite && window.innerWidth)
{
   window.onresize = neuAufbau;
   Weite = Fensterweite();
   Hoehe = Fensterhoehe();
}
if (DOM)  //NS 6.x IE 5.x
{
   document.getElementById("corpus").style.backgroundImage = "url(./pics/wappen_bg.gif)";
   document.getElementById("corpus").style.backgroundRepeat = "no-repeat";
   document.getElementById("corpus").style.backgroundAttachment ="fixed";   
   var str = String((Fensterweite()/2) - 260);
   str = str.concat(" ").concat(String((Fensterhoehe()/2) - 212));
   
   document.getElementById("corpus").style.backgroundPosition = str ;
   
   document.all.corpus.style.backgroundposition="middle center";   
} else
{  
   if  (MS) 
   {
       document.all.corpus.style.background="url(./pics/wappen_bg.jpg) no-repeat middle center";
       document.all.corpus.backgroundrepeat="no-repeat";
       document.all.corpus.style.backgroundposition="middle center";
       document.getElementById("corpus").style.backgroundAttachment ="fixed";
       alert("Nein, hier bin ich !");
   }
   if (NS)
   {       	
       document.layers["NSHintergrund"].background.src = "./pics/wappen_bg.gif";
       document.layers["NSHintergrund"].visibility= "show";
       var t = ((Fensterhoehe()-100)/2) - 212;
       if (t<0) 
      	 t = 0 ;
       document.layers["NSHintergrund"].top = t;
       document.layers["NSHintergrund"].left = (Fensterweite()/2) - 267;
       document["inhaltns"].zIndex=5
   }
}
