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 (LeadingZeros29917 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29917(secs) { if (secs < 0) { document.getElementById("cntdwns29917").innerHTML = FinishMessages29917; return; } DisplayStrs29917 = DisplayFormats29917.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29917 = DisplayStrs29917.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29917 = DisplayStrs29917.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29917 = DisplayStrs29917.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29917").innerHTML = DisplayStrs29917; if (CountActives29917) //alert(SetTimeOutPeriods29917); setTimeout("CountBacks29917(" + (secs+CountSteppers29917) + ")", SetTimeOutPeriods29917); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29917)=="undefined") BackColors29917 = ""; if (typeof(ForeColors29917)=="undefined") ForeColors29917= "white"; if (typeof(TargetDates29917)=="undefined") TargetDates29917 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats29917)=="undefined") DisplayFormats29917 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29917)=="undefined") CountActives29917 = true; if (typeof(FinishMessages29917)=="undefined") FinishMessages29917 = ""; if (typeof(CountSteppers29917)!="number") CountSteppers29917 = -1; if (typeof(LeadingZeros29917)=="undefined") LeadingZeros29917 = true; CountSteppers29917 = Math.ceil(CountSteppers29917); if (CountSteppers29917 == 0) CountActives29917 = false; var SetTimeOutPeriods29917 = (Math.abs(CountSteppers29917)-1)*1000 + 990; puti(BackColors29917, ForeColors29917); var dthens29917 = new Date(TargetDates29917); var dnows29917 = new Date("05/08/2024 1:47:04 PM"); if(CountSteppers29917>0) ddiffs29917 = new Date(dnows29917-dthens29917); else ddiffs29917 = new Date(dthens29917-dnows29917); gsecss29917 = Math.floor(ddiffs29917.valueOf()/1000); CountBacks29917(gsecss29917);