
  var flg = 0;
  var posx;
  var posy;
  var speed = 100;
  
  function startFirstAnimation() {

    posy = parseFloat(document.getElementById("anim").style.top);
    posx = parseFloat(document.getElementById("anim").style.left);
    
    
    setTimeout("startAnimation()", speed*Math.random()*100);
  }

  function startAnimation() {
    if (posy < -435) {
      return;
    } else {
      posx = posx + 0.6;
      document.getElementById("anim").style.left = posx+"px";
      if (flg==0) {
        posy = posy - 1;
        document.getElementById("anim").style.top = posy+"px";
        flg=1;
      } else {
        flg=0;
      }
      setTimeout("startAnimation()", speed);
    }
    
  }
