I want to use javascript to make a snow effect on my website but I only want to use it 50% high on the website. Can anyone help me tidy up my code?

I want to use javascript to make a snow effect on my website but I only want to use it 50% high on the website. Can anyone help me tidy up my code?

javascript

window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
window.cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;

var no = 80;var delai = 10;
var dx = new Array(), xp = new Array(), yp = new Array();
var am = new Array(), stx = new Array(), sty = new Array();
var i;
larg_fenetre = (document.body.offsetWidth<window.innerWidth)? window.innerWidth:document.body.offsetWidth;
haut_fenetre = (document.body.offsetHeight<window.innerHeight)? window.innerHeight:document.body.offsetHeight;

for (i = 0; i < no; i++) { 
    dx[i] = 0;
    xp[i] = Math.random()*(larg_fenetre-40);
    yp[i] = Math.random()*(haut_fenetre-30);
    am[i] = Math.random()*20;
    stx[i] = 0.02 + Math.random()/10;
    sty[i] = 0.4 + Math.random();
    
    obj = document.getElementsByTagName('body')[0];
    para = document.createElement("img");
    para.setAttribute("src","https://i.ibb.co/94kRvYD/snowww.webp");
    para.setAttribute("id","dot" + i);
    para.style.position = "fixed";
    para.style.width="10px";
    para.style.height="10px";
    para.style.zIndex = "-1";
    obj.appendChild(para);
}

function neige() {
    for (i = 0; i < no; i++) {
        dx[i] += stx[i];
        yp[i] += sty[i];
        if (yp[i] > haut_fenetre-50) {
            xp[i] = Math.random()*(larg_fenetre-am[i]-40);
            yp[i] = 0;
        }
        document.getElementById("dot"+i).style.top = yp[i] + "px";
        document.getElementById("dot"+i).style.left = xp[i] + am[i]*Math.sin(dx[i]) + "px";
    }
    setTimeout("neige()", delai);
}

neige();

`

I want to use javascript to make a snow effect on my website but I only want to use it 50% high on the website. Can anyone help me tidy up my code?