// JavaScript Document

//Bei Änderug der Fensterbreit "Reload"
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())
   location.href = location.href;
}

/* Überwachung von Netscape initialisieren */
if (!window.Weite && window.innerWidth) {
 window.onresize = neuAufbau;
 Weite = Fensterweite();
 Hoehe = Fensterhoehe();

}

/* Björnis: CSS-Datei abnhängig von Fenstergroeße aufrufen */
var x,y;
if (self.innerHeight) // all except Explorer
{
   x = self.innerWidth;
   y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
   // Explorer 6 Strict Mode
{
   x = document.documentElement.clientWidth;
   y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
   x = document.body.clientWidth;
   y = document.body.clientHeight;
}
       if (x<"800")
           {
            document.write("<link rel=stylesheet type='text/css' href='style_smallwindows.css'>");
             } else {
           document.write("<link rel=stylesheet type=text/css href='style.css'>");
}
