function fadeIn()

in pysteve/www/htdocs/js/steve_stv.js [480:515]


function fadeIn(x, y, z) {
    if (source) {
        if (x == 0) {
            gz = z;
        }
        if (z != gz) {
            return;
        }
        x += 0.1
        if (x >= 1) {
            x = 1
        }
        document.getElementById(source).style.opacity = String(x)
        
        
        document.getElementById(source).setAttribute("class", "ballotSelected")
        if (x < 1) {
            fading = true
            window.setTimeout(function() { fadeIn(x, y, z)}, 25)
            
        } else {
             window.setTimeout(function() {fading = false }, 250)
            if (y == "ballot") {
                document.getElementById(source).setAttribute("class", "ballotbox")
                
            } else {
                document.getElementById(source).setAttribute("class", "ballotbox_clist")
                
            }
            source = null
            drawList();
            
            
        }
    }   
}