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 (LeadingZeros29512 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29512(secs) { if (secs < 0) { document.getElementById("cntdwns29512").innerHTML = FinishMessages29512; return; } DisplayStrs29512 = DisplayFormats29512.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29512 = DisplayStrs29512.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29512 = DisplayStrs29512.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29512 = DisplayStrs29512.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29512").innerHTML = DisplayStrs29512; if (CountActives29512) //alert(SetTimeOutPeriods29512); setTimeout("CountBacks29512(" + (secs+CountSteppers29512) + ")", SetTimeOutPeriods29512); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29512)=="undefined") BackColors29512 = ""; if (typeof(ForeColors29512)=="undefined") ForeColors29512= "white"; if (typeof(TargetDates29512)=="undefined") TargetDates29512 = "12/04/2023 10:00:00 PM"; if (typeof(DisplayFormats29512)=="undefined") DisplayFormats29512 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29512)=="undefined") CountActives29512 = true; if (typeof(FinishMessages29512)=="undefined") FinishMessages29512 = ""; if (typeof(CountSteppers29512)!="number") CountSteppers29512 = -1; if (typeof(LeadingZeros29512)=="undefined") LeadingZeros29512 = true; CountSteppers29512 = Math.ceil(CountSteppers29512); if (CountSteppers29512 == 0) CountActives29512 = false; var SetTimeOutPeriods29512 = (Math.abs(CountSteppers29512)-1)*1000 + 990; puti(BackColors29512, ForeColors29512); var dthens29512 = new Date(TargetDates29512); var dnows29512 = new Date("05/09/2025 6:39:55 AM"); if(CountSteppers29512>0) ddiffs29512 = new Date(dnows29512-dthens29512); else ddiffs29512 = new Date(dthens29512-dnows29512); gsecss29512 = Math.floor(ddiffs29512.valueOf()/1000); CountBacks29512(gsecss29512);