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 (LeadingZeros29814 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29814(secs) { if (secs < 0) { document.getElementById("cntdwns29814").innerHTML = FinishMessages29814; return; } DisplayStrs29814 = DisplayFormats29814.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29814 = DisplayStrs29814.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29814 = DisplayStrs29814.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29814 = DisplayStrs29814.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29814").innerHTML = DisplayStrs29814; if (CountActives29814) //alert(SetTimeOutPeriods29814); setTimeout("CountBacks29814(" + (secs+CountSteppers29814) + ")", SetTimeOutPeriods29814); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29814)=="undefined") BackColors29814 = ""; if (typeof(ForeColors29814)=="undefined") ForeColors29814= "white"; if (typeof(TargetDates29814)=="undefined") TargetDates29814 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats29814)=="undefined") DisplayFormats29814 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29814)=="undefined") CountActives29814 = true; if (typeof(FinishMessages29814)=="undefined") FinishMessages29814 = ""; if (typeof(CountSteppers29814)!="number") CountSteppers29814 = -1; if (typeof(LeadingZeros29814)=="undefined") LeadingZeros29814 = true; CountSteppers29814 = Math.ceil(CountSteppers29814); if (CountSteppers29814 == 0) CountActives29814 = false; var SetTimeOutPeriods29814 = (Math.abs(CountSteppers29814)-1)*1000 + 990; puti(BackColors29814, ForeColors29814); var dthens29814 = new Date(TargetDates29814); var dnows29814 = new Date("04/29/2024 12:22:18 PM"); if(CountSteppers29814>0) ddiffs29814 = new Date(dnows29814-dthens29814); else ddiffs29814 = new Date(dthens29814-dnows29814); gsecss29814 = Math.floor(ddiffs29814.valueOf()/1000); CountBacks29814(gsecss29814);