/***************************/
/* OS-Informatik AG - 2009 */
/***************************/

var y1 = 1;
var x1 = 1;
var y2 = 1;
var x2 = 1;
var y3 = 1;
var x3 = 1;
var y4 = 1;
var x4 = 1;
var y5 = 1;
var x5 = 1;
var y6 = 1;
var x6 = 1;
var y7 = 1;
var x7 = 1;
var y11 = 1;
var x11 = 1;
var y12 = 1;
var x12 = 1;
var y13 = 1;
var x13 = 1;
var y14 = 1;
var x14 = 1;
var y15 = 1;
var x15 = 1;
var y16 = 1;
var x16 = 1;
var y17 = 1;
var x17 = 1;

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();
  x1 = Weite / 16;
  x2 = Weite / 8;
  x3 = Weite / 4;
  x4 = Weite / 2.6;
  x5 = Weite / 2;
  x6 = Weite / 1.6;
  x7 = Weite / 1.3;
  x11 = Weite / 16;
  x12 = Weite / 8;
  x13 = Weite / 4;
  x14 = Weite / 2.6;
  x15 = Weite / 2;
  x16 = Weite / 1.6;
  x17 = Weite / 1.3;
  y2 = Hoehe / 4;
  y5 = Hoehe / 4;
  y11 = Hoehe / 2;
  y12 = Hoehe / 1.3;
  y13 = Hoehe / 2;
  y14 = Hoehe / 2;
  y15 = Hoehe / 1.3;
  y16 = Hoehe / 2;
  y17 = Hoehe / 2;
}

/*************************************************************************************************/

function flocke()  {    
      x1 = x1 + Math.floor(Math.random()*2);
      y1 = y1 + 3;
      x2 = x2 + Math.floor(Math.random()*2);
      y2 = y2 + 4;
      x3 = x3 + Math.floor(Math.random()*2);
      y3 = y3 + 2.8;
      x4 = x4 + Math.floor(Math.random()*2);
      y4 = y4 + 3.5;
      x5 = x5 + Math.floor(Math.random()*2);
      y5 = y5 + 2;
      x6 = x6 + Math.floor(Math.random()*2);
      y6 = y6 + 1.8;
      x7 = x7 + Math.floor(Math.random()*2);
      y7 = y7 + 2.3;
      x11 = x11 + Math.floor(Math.random()*2);
      y11 = y11 + 3;
      x12 = x12 + Math.floor(Math.random()*2);
      y12 = y12 + 4;
      x13 = x13 + Math.floor(Math.random()*2);
      y13 = y13 + 2.8;
      x14 = x14 + Math.floor(Math.random()*2);
      y14 = y14 + 3.5;
      x15 = x15 + Math.floor(Math.random()*2);
      y15 = y15 + 2;
      x16 = x16 + Math.floor(Math.random()*2);
      y16 = y16 + 1.8;
      x17 = x17 + Math.floor(Math.random()*2);
      y17 = y17 + 2.3;
      if (y1 > (Hoehe -55)) x1 = Weite / 16;
      if (y1 > (Hoehe -55)) y1 = -50;
      if (y2 > (Hoehe -55)) x2 = Weite / 8;
      if (y2 > (Hoehe -55)) y2 = -50;
      if (y3 > (Hoehe -55)) x3 = Weite / 4;
      if (y3 > (Hoehe -55)) y3 = -50;
      if (y4 > (Hoehe -55)) x4 = Weite / 2.6;
      if (y4 > (Hoehe -55)) y4 = -50;
      if (y5 > (Hoehe -55)) x5 = Weite / 2;
      if (y5 > (Hoehe -55)) y5 = -50;
      if (y6 > (Hoehe -55)) x6 = Weite / 1.6;
      if (y6 > (Hoehe -55)) y6 = -50;
      if (y7 > (Hoehe -55)) x7 = Weite / 1.3;
      if (y7 > (Hoehe -55)) y7 = -50;
      if (y11 > (Hoehe -55)) x11 = Weite / 16;
      if (y11 > (Hoehe -55)) y11 = -50;
      if (y12 > (Hoehe -55)) x12 = Weite / 8;
      if (y12 > (Hoehe -55)) y12 = -50;
      if (y13 > (Hoehe -55)) x13 = Weite / 4;
      if (y13 > (Hoehe -55)) y13 = -50;
      if (y14 > (Hoehe -55)) x14 = Weite / 2.6;
      if (y14 > (Hoehe -55)) y14 = -50;
      if (y15 > (Hoehe -55)) x15 = Weite / 2;
      if (y15 > (Hoehe -55)) y15 = -50;
      if (y16 > (Hoehe -55)) x16 = Weite / 1.6;
      if (y16 > (Hoehe -55)) y16 = -50;
      if (y17 > (Hoehe -55)) x17 = Weite / 1.3;
      if (y17 > (Hoehe -55)) y17 = -50;
      
      if (x5 > (Weite -70)) x5 = Weite / 2;
      if (x6 > (Weite -70)) x6 = Weite / 1.6;
      if (x7 > (Weite -70)) x7 = Weite / 1.3;
      if (x15 > (Weite -70)) x15 = Weite / 2;
      if (x16 > (Weite -70)) x16 = Weite / 1.6;
      if (x17 > (Weite -70)) x17 = Weite / 1.3;

      flocke1.style.left = x1;
      flocke1.style.top = y1;
      flocke2.style.left = x2;
      flocke2.style.top = y2;
      flocke3.style.left = x3;
      flocke3.style.top = y3;
      flocke4.style.left = x4;
      flocke4.style.top = y4;
      flocke5.style.left = x5;
      flocke5.style.top = y5;
      flocke6.style.left = x6;
      flocke6.style.top = y6;
      flocke7.style.left = x7;
      flocke7.style.top = y7;
      flocke11.style.left = x11;
      flocke11.style.top = y11;
      flocke12.style.left = x12;
      flocke12.style.top = y12;
      flocke13.style.left = x13;
      flocke13.style.top = y13;
      flocke14.style.left = x14;
      flocke14.style.top = y14;
      flocke15.style.left = x15;
      flocke15.style.top = y15;
      flocke16.style.left = x16;
      flocke16.style.top = y16;
      flocke17.style.left = x17;
      flocke17.style.top = y17;
      window.setTimeout ('flocke()', 40); }
      
      
      
/*** Ende ****************************************************************************************/