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 (LeadingZeros30244 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30244(secs) { if (secs < 0) { document.getElementById("cntdwns30244").innerHTML = FinishMessages30244; return; } DisplayStrs30244 = DisplayFormats30244.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30244 = DisplayStrs30244.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30244 = DisplayStrs30244.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30244 = DisplayStrs30244.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30244").innerHTML = DisplayStrs30244; if (CountActives30244) //alert(SetTimeOutPeriods30244); setTimeout("CountBacks30244(" + (secs+CountSteppers30244) + ")", SetTimeOutPeriods30244); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30244)=="undefined") BackColors30244 = ""; if (typeof(ForeColors30244)=="undefined") ForeColors30244= "white"; if (typeof(TargetDates30244)=="undefined") TargetDates30244 = "04/28/2024 10:00:00 PM"; if (typeof(DisplayFormats30244)=="undefined") DisplayFormats30244 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30244)=="undefined") CountActives30244 = true; if (typeof(FinishMessages30244)=="undefined") FinishMessages30244 = ""; if (typeof(CountSteppers30244)!="number") CountSteppers30244 = -1; if (typeof(LeadingZeros30244)=="undefined") LeadingZeros30244 = true; CountSteppers30244 = Math.ceil(CountSteppers30244); if (CountSteppers30244 == 0) CountActives30244 = false; var SetTimeOutPeriods30244 = (Math.abs(CountSteppers30244)-1)*1000 + 990; puti(BackColors30244, ForeColors30244); var dthens30244 = new Date(TargetDates30244); var dnows30244 = new Date("05/05/2024 6:52:05 PM"); if(CountSteppers30244>0) ddiffs30244 = new Date(dnows30244-dthens30244); else ddiffs30244 = new Date(dthens30244-dnows30244); gsecss30244 = Math.floor(ddiffs30244.valueOf()/1000); CountBacks30244(gsecss30244);