// JavaScript Document by Uman for Halo.fr

var time_end_challenge_day=date_end_challenge_day.getTime()+3600000*11-date_end_challenge_day.getTimezoneOffset()*60000;var time_end_challenge_week=date_end_challenge_week.getTime()+3600000*11-date_end_challenge_week.getTimezoneOffset()*60000;function countdownChallenges(){if(document.getElementById){nowDate=new Date;nowTime=nowDate.getTime();diffTime_day=Math.floor((time_end_challenge_day-nowTime)/10);diffTime_week=Math.floor((time_end_challenge_week-nowTime)/10);day_diff=parseInt((diffTime_week/100)/3600/24);seconds_diff=parseInt((diffTime_week/100)%60);minutes_diff=parseInt((diffTime_week/100)/60%60);hours_diff=parseInt((diffTime_week/100)/3600%24);if(seconds_diff<10){seconds_diff='0'+seconds_diff}if(minutes_diff<10){minutes_diff='0'+minutes_diff}total_str_diff=hours_diff+':'+minutes_diff+':'+seconds_diff;if(diffTime_week>0){if(day_diff>1){document.getElementById("challenge_week_countdown").innerHTML='Temp restant: '+day_diff+' jours '+total_str_diff}else if(day_diff==1){document.getElementById("challenge_week_countdown").innerHTML='Temp restant: 1 jour '+total_str_diff}else{document.getElementById("challenge_week_countdown").innerHTML='Temp restant: '+total_str_diff}if(diffTime_day>0){document.getElementById("challenge_1_countdown").innerHTML='Temp restant: '+total_str_diff;document.getElementById("challenge_2_countdown").innerHTML='Temp restant: '+total_str_diff;document.getElementById("challenge_3_countdown").innerHTML='Temp restant: '+total_str_diff;document.getElementById("challenge_4_countdown").innerHTML='Temp restant: '+total_str_diff}else{document.getElementById("challenge_1_countdown").innerHTML="Defi en attente d'actualisation.";document.getElementById("challenge_2_countdown").innerHTML="Defi en attente d'actualisation.";document.getElementById("challenge_3_countdown").innerHTML="Defi en attente d'actualisation.";document.getElementById("challenge_4_countdown").innerHTML="Defi en attente d'actualisation."}setTimeout("countdownChallenges()",1000)}else{document.getElementById("challenge_week_countdown").innerHTML="Defi en attente d'actualisation."}}}countdownChallenges();
