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 (LeadingZeros29255 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29255(secs) { if (secs < 0) { document.getElementById("cntdwns29255").innerHTML = FinishMessages29255; return; } DisplayStrs29255 = DisplayFormats29255.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29255 = DisplayStrs29255.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29255 = DisplayStrs29255.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29255 = DisplayStrs29255.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29255").innerHTML = DisplayStrs29255; if (CountActives29255) //alert(SetTimeOutPeriods29255); setTimeout("CountBacks29255(" + (secs+CountSteppers29255) + ")", SetTimeOutPeriods29255); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29255)=="undefined") BackColors29255 = ""; if (typeof(ForeColors29255)=="undefined") ForeColors29255= "white"; if (typeof(TargetDates29255)=="undefined") TargetDates29255 = "10/04/2023 10:00:00 PM"; if (typeof(DisplayFormats29255)=="undefined") DisplayFormats29255 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29255)=="undefined") CountActives29255 = true; if (typeof(FinishMessages29255)=="undefined") FinishMessages29255 = ""; if (typeof(CountSteppers29255)!="number") CountSteppers29255 = -1; if (typeof(LeadingZeros29255)=="undefined") LeadingZeros29255 = true; CountSteppers29255 = Math.ceil(CountSteppers29255); if (CountSteppers29255 == 0) CountActives29255 = false; var SetTimeOutPeriods29255 = (Math.abs(CountSteppers29255)-1)*1000 + 990; puti(BackColors29255, ForeColors29255); var dthens29255 = new Date(TargetDates29255); var dnows29255 = new Date("05/11/2025 9:01:58 PM"); if(CountSteppers29255>0) ddiffs29255 = new Date(dnows29255-dthens29255); else ddiffs29255 = new Date(dthens29255-dnows29255); gsecss29255 = Math.floor(ddiffs29255.valueOf()/1000); CountBacks29255(gsecss29255);