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 (LeadingZeros30291 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30291(secs) { if (secs < 0) { document.getElementById("cntdwns30291").innerHTML = FinishMessages30291; return; } DisplayStrs30291 = DisplayFormats30291.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30291 = DisplayStrs30291.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30291 = DisplayStrs30291.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30291 = DisplayStrs30291.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30291").innerHTML = DisplayStrs30291; if (CountActives30291) //alert(SetTimeOutPeriods30291); setTimeout("CountBacks30291(" + (secs+CountSteppers30291) + ")", SetTimeOutPeriods30291); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30291)=="undefined") BackColors30291 = ""; if (typeof(ForeColors30291)=="undefined") ForeColors30291= "white"; if (typeof(TargetDates30291)=="undefined") TargetDates30291 = "04/28/2024 10:00:00 PM"; if (typeof(DisplayFormats30291)=="undefined") DisplayFormats30291 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30291)=="undefined") CountActives30291 = true; if (typeof(FinishMessages30291)=="undefined") FinishMessages30291 = ""; if (typeof(CountSteppers30291)!="number") CountSteppers30291 = -1; if (typeof(LeadingZeros30291)=="undefined") LeadingZeros30291 = true; CountSteppers30291 = Math.ceil(CountSteppers30291); if (CountSteppers30291 == 0) CountActives30291 = false; var SetTimeOutPeriods30291 = (Math.abs(CountSteppers30291)-1)*1000 + 990; puti(BackColors30291, ForeColors30291); var dthens30291 = new Date(TargetDates30291); var dnows30291 = new Date("05/07/2024 1:30:24 PM"); if(CountSteppers30291>0) ddiffs30291 = new Date(dnows30291-dthens30291); else ddiffs30291 = new Date(dthens30291-dnows30291); gsecss30291 = Math.floor(ddiffs30291.valueOf()/1000); CountBacks30291(gsecss30291);