 var no = 100; // snow number
 var speed = 20; // smaller number moves the snow faster
 var snowflake = "../img/snow3.gif";

 var dx, xp, yp;    // coordinate and position variables
 var am, stx, sty;  // amplitude and step variables
 var i;
 var doc_width = 753;
 var doc_height = 680;

 dx = new Array();
 xp = new Array();
 yp = new Array();
 am = new Array();
 stx = new Array();
 sty = new Array();
 for (i = 0; i < no; ++ i)
 {
  dx[i] = 0;                        // set coordinate variables
  xp[i] = Math.random()*(doc_width-50);  // set position variables
  yp[i] = Math.random()*doc_height;
  am[i] = Math.random()*20;         // set amplitude variables
  stx[i] = 0.02 + Math.random()/10; // set step variables
  sty[i] = 0.7 + Math.random();     // set step variables
  s = "<div id=\"dot"+ i +"\" style=\"POSITION: ";
  s += "absolute; Z-INDEX: "+ i +"; VISIBILITY: ";
  s += "visible; TOP: " + xp[i] + "px; LEFT: " + yp[i] + "px;\"><img src=\"";
  s += snowflake + "\" border=\"0\"></div>";
  document.write(s);
 }

 function snowIE()
 {  // IE main animation function
    //doc_width = parseInt(document.body.clientWidth);
    //doc_height = parseInt(document.body.clientHeight);
  for (i = 0; i < no; ++ i)
  {  // iterate for every dot
   yp[i] = yp[i] + sty[i];
   if (yp[i] > doc_height)
   {
    xp[i] = Math.random()*(doc_width-am[i]-30);
    yp[i] = 0;
    stx[i] = 0.02 + Math.random()/10;
    sty[i] = 0.7 + Math.random();
   }
   dx[i] += stx[i];
   
   dotstyle = document.getElementById('dot'+i).style;
   dotstyle.top = yp[i];
   dotstyle.left = xp[i] + am[i]*Math.sin(dx[i]);
  }
  window.setTimeout("snowIE()", speed);
 }

  snowIE();
function cblatt(x)
{
 f=window.open("calendar_blatt.php3?d=" + x, "", "innerwidth=300,innerheight=500");
 f.focus();
}
