.... else if (difference>0) document.write("<span style='color: red;'>Faltan "+difference+" días para "+before+"</span>") } ...