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 (LeadingZeros29221 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29221(secs) { if (secs < 0) { document.getElementById("cntdwns29221").innerHTML = FinishMessages29221; return; } DisplayStrs29221 = DisplayFormats29221.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29221 = DisplayStrs29221.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29221 = DisplayStrs29221.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29221 = DisplayStrs29221.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29221").innerHTML = DisplayStrs29221; if (CountActives29221) //alert(SetTimeOutPeriods29221); setTimeout("CountBacks29221(" + (secs+CountSteppers29221) + ")", SetTimeOutPeriods29221); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29221)=="undefined") BackColors29221 = ""; if (typeof(ForeColors29221)=="undefined") ForeColors29221= "white"; if (typeof(TargetDates29221)=="undefined") TargetDates29221 = "10/04/2023 10:00:00 PM"; if (typeof(DisplayFormats29221)=="undefined") DisplayFormats29221 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29221)=="undefined") CountActives29221 = true; if (typeof(FinishMessages29221)=="undefined") FinishMessages29221 = ""; if (typeof(CountSteppers29221)!="number") CountSteppers29221 = -1; if (typeof(LeadingZeros29221)=="undefined") LeadingZeros29221 = true; CountSteppers29221 = Math.ceil(CountSteppers29221); if (CountSteppers29221 == 0) CountActives29221 = false; var SetTimeOutPeriods29221 = (Math.abs(CountSteppers29221)-1)*1000 + 990; puti(BackColors29221, ForeColors29221); var dthens29221 = new Date(TargetDates29221); var dnows29221 = new Date("05/09/2025 10:09:34 AM"); if(CountSteppers29221>0) ddiffs29221 = new Date(dnows29221-dthens29221); else ddiffs29221 = new Date(dthens29221-dnows29221); gsecss29221 = Math.floor(ddiffs29221.valueOf()/1000); CountBacks29221(gsecss29221);