function calcage(secs, num1, num2, addDay, seconds) { if (addDay == 1){ s = ((Math.floor(secs/num1))).toString(); } else{ s = ((Math.floor(secs/num1))%num2).toString(); } if (LeadingZeros29540 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29540(secs) { if (secs < 0) { document.getElementById("cntdwns29540").innerHTML = FinishMessages29540; return; } DisplayStrs29540 = DisplayFormats29540.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29540 = DisplayStrs29540.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29540 = DisplayStrs29540.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29540 = DisplayStrs29540.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29540").innerHTML = DisplayStrs29540; if (CountActives29540) //alert(SetTimeOutPeriods29540); setTimeout("CountBacks29540(" + (secs+CountSteppers29540) + ")", SetTimeOutPeriods29540); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29540)=="undefined") BackColors29540 = ""; if (typeof(ForeColors29540)=="undefined") ForeColors29540= "white"; if (typeof(TargetDates29540)=="undefined") TargetDates29540 = "12/05/2023 10:00:00 PM"; if (typeof(DisplayFormats29540)=="undefined") DisplayFormats29540 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29540)=="undefined") CountActives29540 = true; if (typeof(FinishMessages29540)=="undefined") FinishMessages29540 = ""; if (typeof(CountSteppers29540)!="number") CountSteppers29540 = -1; if (typeof(LeadingZeros29540)=="undefined") LeadingZeros29540 = true; CountSteppers29540 = Math.ceil(CountSteppers29540); if (CountSteppers29540 == 0) CountActives29540 = false; var SetTimeOutPeriods29540 = (Math.abs(CountSteppers29540)-1)*1000 + 990; puti(BackColors29540, ForeColors29540); var dthens29540 = new Date(TargetDates29540); var dnows29540 = new Date("05/09/2025 6:40:48 AM"); if(CountSteppers29540>0) ddiffs29540 = new Date(dnows29540-dthens29540); else ddiffs29540 = new Date(dthens29540-dnows29540); gsecss29540 = Math.floor(ddiffs29540.valueOf()/1000); CountBacks29540(gsecss29540);