var DHTML = 0, DOM = 0, MS = 0, NS = 0;
var GECKO = 0, MSIE = 0, NETSCAPE = 0, OPERA = 0;
var WINDOWS = 0, MAC = 0, LINUX = 0;
var BREITE = 0, HOEHE = 0, FARBEN = 0, VERSION = 0;
var JAVA = 0, FLASH = 0;

function DHTML_init() {
 if(window.opera) OPERA = 1;
 if(document.getElementById) { DHTML = 1; DOM = 1; }
 if(document.all && !OPERA) { DHTML = 1; MS = 1; }
 if(document.layers) { DHTML = 1; NS = 1; NETSCAPE = 1; VERSION = 4; }
 if(navigator.userAgent.indexOf("Mozilla") >= 0) {
  if(navigator.userAgent.indexOf("Gecko") >= 0) GECKO = 1;
  else if(navigator.userAgent.indexOf("MSIE") >= 0) MSIE = 1;
  else if((navigator.userAgent.indexOf("I;") >= 0) ||
          (navigator.userAgent.indexOf("I)") >= 0) ||
          (navigator.userAgent.indexOf("U;") >= 0) ||
          (navigator.userAgent.indexOf("U)") >= 0) ||
          (navigator.userAgent.indexOf("N;") >= 0) ||
          (navigator.userAgent.indexOf("N)") >= 0))
   NETSCAPE = 1;
 }
 if((navigator.userAgent.indexOf("Win") >= 0) ||
    (navigator.userAgent.indexOf("Windows)") >= 0))
   WINDOWS = 1;
 else if((navigator.userAgent.indexOf("Mac") >= 0) ||
         (navigator.userAgent.indexOf("Macintosh)") >= 0))
   MAC = 1;
 else if(navigator.userAgent.indexOf("Mac") >= 0)
  LINUX = 1;
 if(RegExp) {
  RE = /(\d)/;
  RE.exec(navigator.appVersion);
  VERSION = parseInt(RegExp.$1);
  if(GECKO && RegExp.$1 == "5") VERSION = 1;
  if(MSIE) {
   RE = /MSIE (\d)/;
   RE.exec(navigator.appVersion);
   VERSION = parseInt(RegExp.$1);
  }
 }
}

DHTML_init();

function setSizes(){
 if(window.clientWidth) {
  BREITE = window.clientWidth;
  HOEHE = window.clientHeight;
 }
 else if(window.innerWidth) {
  BREITE = window.innerWidth;
  HOEHE = window.innerHeight;
 }
 else if(!window.clientWidth && document.body.offsetWidth) {
  BREITE = document.body.offsetWidth;
  HOEHE = document.body.offsetHeight;
 }
 if(screen.colorDepth)
  FARBEN = Math.pow(2,screen.colorDepth);
 if(navigator.javaEnabled()) JAVA = 1;
 if(navigator.plugins) {
  for(var i=0; i < navigator.plugins.length; i++)
   if(navigator.plugins[i].name.indexOf("Flash") >= 0) FLASH = 1;
 }
 else if(MSIE && VERSION >= 5) {
  try { testObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   if(testObj != null) FLASH = 1;  }
  catch (e) { FLASH = 0; }
 }
}
