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 (LeadingZeros29470 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29470(secs) { if (secs < 0) { document.getElementById("cntdwns29470").innerHTML = FinishMessages29470; return; } DisplayStrs29470 = DisplayFormats29470.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29470 = DisplayStrs29470.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29470 = DisplayStrs29470.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29470 = DisplayStrs29470.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29470").innerHTML = DisplayStrs29470; if (CountActives29470) //alert(SetTimeOutPeriods29470); setTimeout("CountBacks29470(" + (secs+CountSteppers29470) + ")", SetTimeOutPeriods29470); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29470)=="undefined") BackColors29470 = ""; if (typeof(ForeColors29470)=="undefined") ForeColors29470= "white"; if (typeof(TargetDates29470)=="undefined") TargetDates29470 = "12/04/2023 10:00:00 PM"; if (typeof(DisplayFormats29470)=="undefined") DisplayFormats29470 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29470)=="undefined") CountActives29470 = true; if (typeof(FinishMessages29470)=="undefined") FinishMessages29470 = ""; if (typeof(CountSteppers29470)!="number") CountSteppers29470 = -1; if (typeof(LeadingZeros29470)=="undefined") LeadingZeros29470 = true; CountSteppers29470 = Math.ceil(CountSteppers29470); if (CountSteppers29470 == 0) CountActives29470 = false; var SetTimeOutPeriods29470 = (Math.abs(CountSteppers29470)-1)*1000 + 990; puti(BackColors29470, ForeColors29470); var dthens29470 = new Date(TargetDates29470); var dnows29470 = new Date("05/11/2025 5:42:37 PM"); if(CountSteppers29470>0) ddiffs29470 = new Date(dnows29470-dthens29470); else ddiffs29470 = new Date(dthens29470-dnows29470); gsecss29470 = Math.floor(ddiffs29470.valueOf()/1000); CountBacks29470(gsecss29470);