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 (LeadingZeros30312 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30312(secs) { if (secs < 0) { document.getElementById("cntdwns30312").innerHTML = FinishMessages30312; return; } DisplayStrs30312 = DisplayFormats30312.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30312 = DisplayStrs30312.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30312 = DisplayStrs30312.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30312 = DisplayStrs30312.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30312").innerHTML = DisplayStrs30312; if (CountActives30312) //alert(SetTimeOutPeriods30312); setTimeout("CountBacks30312(" + (secs+CountSteppers30312) + ")", SetTimeOutPeriods30312); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30312)=="undefined") BackColors30312 = ""; if (typeof(ForeColors30312)=="undefined") ForeColors30312= "white"; if (typeof(TargetDates30312)=="undefined") TargetDates30312 = "04/18/2024 10:00:00 PM"; if (typeof(DisplayFormats30312)=="undefined") DisplayFormats30312 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30312)=="undefined") CountActives30312 = true; if (typeof(FinishMessages30312)=="undefined") FinishMessages30312 = ""; if (typeof(CountSteppers30312)!="number") CountSteppers30312 = -1; if (typeof(LeadingZeros30312)=="undefined") LeadingZeros30312 = true; CountSteppers30312 = Math.ceil(CountSteppers30312); if (CountSteppers30312 == 0) CountActives30312 = false; var SetTimeOutPeriods30312 = (Math.abs(CountSteppers30312)-1)*1000 + 990; puti(BackColors30312, ForeColors30312); var dthens30312 = new Date(TargetDates30312); var dnows30312 = new Date("04/29/2024 7:05:39 PM"); if(CountSteppers30312>0) ddiffs30312 = new Date(dnows30312-dthens30312); else ddiffs30312 = new Date(dthens30312-dnows30312); gsecss30312 = Math.floor(ddiffs30312.valueOf()/1000); CountBacks30312(gsecss30312);