function get_timer(){ var curdate = new Date(); var Mois = curdate.getMonth(); Maintenant = new Date; if(typeof(TempMaintenant) == 'undefined') { TempMaintenant = 1280423619000; //alert(TempMaintenant + "- 1280423619000"); } else TempMaintenant = TempMaintenant + 1000; // mettre ici la date de fin du décompte Future = new Date(2008, 5, 25); TempFuture = Future.getTime(); DiffSec = Math.floor((TempFuture-TempMaintenant)/1000); DiffMin = Math.floor(DiffSec/60); Diffheure = Math.floor(DiffMin/60); DiffJour = Math.floor(Diffheure/24); while (DiffMin>=60) { DiffMin = DiffMin-60; } while (Diffheure>=24) { Diffheure = Diffheure-24; } while (DiffSec>=60) { DiffSec = DiffSec-60; } timer_array = new Array(DiffJour, Diffheure, DiffMin, DiffSec); if(timer_array[3] >= 0) jQuery('#decompte_texte').html(timer_array[0] + " jours " + timer_array[1] + " h " + timer_array[2] + " min et " + timer_array[3] + " sec"); else jQuery('#decompte_texte').html("Concours terminé !"); setTimeout("get_timer()",1000); }