function SHOW_IMG(){ //class
        var no = 5; 
        var speed = 7; 
        var snowflake = "note.gif";
        var dx, xp, yp;
        var am, stx, sty;
        var doc_width;
        var doc_height;
        //init_it();
        dx = new Array();
        xp = new Array();
        yp = new Array();
        am = new Array();
        stx = new Array();
        sty = new Array();
        for (var i = 0; i < no; ++ i) {
                dx[i] = 0;
                am[i] = 1;
                xp[i] = 0;
                yp[i]=null;
                document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
                document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
                document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
                document.write(snowflake + "\" border=\"0\"></div>");
        }
        if (window.onload==undefined){
                window.onload=function onload1() {snow_img_object.start_it();};
        }
        //methds
        this.snow1step = function (){
                doc_width = document.body.clientWidth;
                doc_height = document.body.clientHeight;
                for (var i = 0; i < no; ++ i) {
                        if (yp[i]==null || yp[i] > doc_height-50) {
                                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();
                        }else{
                                yp[i] += sty[i];
                                xp[i] += stx[i];
                        }
                        var objDot = document.getElementById("dot"+i).style;
                        objDot.top = yp[i];
                        objDot.left = xp[i] + am[i]*Math.sin(dx[i]);
                }
                //window.setTimeout(snowIE, speed);
        }
        this.start_it = function(){
                window.setInterval(this.snow1step, speed);
        }
}

var snow_img_object = new SHOW_IMG();

function start_snow_img_onload(){ //should be called from <body onload.="...
        snow_img_object.start_it();
}

