/* * To change this template, choose Tools | Templates * and open the template in the editor. */ tempo= 150; pas= 0.05; al_max= 0.4; var p= 0; var allumage= null; function AllumeProgressif(id) { if (p > al_max) clearInterval(allumage); p += pas; elt= document.getElementById(id); elt.style.opacity= p; elt.style.filter = 'alpha(opacity=' + (p*100) + ')'; } function Allume(id) { p= 0; allumage= setInterval("AllumeProgressif('"+id+"')", tempo); } function Eteint(id) { if (allumage != null) clearInterval(allumage); elt= document.getElementById(id); elt.style.opacity= 0; elt.style.filter = 'alpha(opacity=0)'; }