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 (LeadingZeros29720 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29720(secs) { if (secs < 0) { document.getElementById("cntdwns29720").innerHTML = FinishMessages29720; return; } DisplayStrs29720 = DisplayFormats29720.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29720 = DisplayStrs29720.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29720 = DisplayStrs29720.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29720 = DisplayStrs29720.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29720").innerHTML = DisplayStrs29720; if (CountActives29720) //alert(SetTimeOutPeriods29720); setTimeout("CountBacks29720(" + (secs+CountSteppers29720) + ")", SetTimeOutPeriods29720); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29720)=="undefined") BackColors29720 = ""; if (typeof(ForeColors29720)=="undefined") ForeColors29720= "white"; if (typeof(TargetDates29720)=="undefined") TargetDates29720 = "03/30/2024 10:00:00 PM"; if (typeof(DisplayFormats29720)=="undefined") DisplayFormats29720 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29720)=="undefined") CountActives29720 = true; if (typeof(FinishMessages29720)=="undefined") FinishMessages29720 = ""; if (typeof(CountSteppers29720)!="number") CountSteppers29720 = -1; if (typeof(LeadingZeros29720)=="undefined") LeadingZeros29720 = true; CountSteppers29720 = Math.ceil(CountSteppers29720); if (CountSteppers29720 == 0) CountActives29720 = false; var SetTimeOutPeriods29720 = (Math.abs(CountSteppers29720)-1)*1000 + 990; puti(BackColors29720, ForeColors29720); var dthens29720 = new Date(TargetDates29720); var dnows29720 = new Date("04/29/2024 6:10:52 PM"); if(CountSteppers29720>0) ddiffs29720 = new Date(dnows29720-dthens29720); else ddiffs29720 = new Date(dthens29720-dnows29720); gsecss29720 = Math.floor(ddiffs29720.valueOf()/1000); CountBacks29720(gsecss29720);