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 (LeadingZeros29246 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29246(secs) { if (secs < 0) { document.getElementById("cntdwns29246").innerHTML = FinishMessages29246; return; } DisplayStrs29246 = DisplayFormats29246.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29246 = DisplayStrs29246.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29246 = DisplayStrs29246.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29246 = DisplayStrs29246.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29246").innerHTML = DisplayStrs29246; if (CountActives29246) //alert(SetTimeOutPeriods29246); setTimeout("CountBacks29246(" + (secs+CountSteppers29246) + ")", SetTimeOutPeriods29246); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29246)=="undefined") BackColors29246 = ""; if (typeof(ForeColors29246)=="undefined") ForeColors29246= "white"; if (typeof(TargetDates29246)=="undefined") TargetDates29246 = "10/05/2023 10:00:00 PM"; if (typeof(DisplayFormats29246)=="undefined") DisplayFormats29246 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29246)=="undefined") CountActives29246 = true; if (typeof(FinishMessages29246)=="undefined") FinishMessages29246 = ""; if (typeof(CountSteppers29246)!="number") CountSteppers29246 = -1; if (typeof(LeadingZeros29246)=="undefined") LeadingZeros29246 = true; CountSteppers29246 = Math.ceil(CountSteppers29246); if (CountSteppers29246 == 0) CountActives29246 = false; var SetTimeOutPeriods29246 = (Math.abs(CountSteppers29246)-1)*1000 + 990; puti(BackColors29246, ForeColors29246); var dthens29246 = new Date(TargetDates29246); var dnows29246 = new Date("05/11/2025 9:01:59 PM"); if(CountSteppers29246>0) ddiffs29246 = new Date(dnows29246-dthens29246); else ddiffs29246 = new Date(dthens29246-dnows29246); gsecss29246 = Math.floor(ddiffs29246.valueOf()/1000); CountBacks29246(gsecss29246);