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 (LeadingZeros30214 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30214(secs) { if (secs < 0) { document.getElementById("cntdwns30214").innerHTML = FinishMessages30214; return; } DisplayStrs30214 = DisplayFormats30214.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30214 = DisplayStrs30214.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30214 = DisplayStrs30214.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30214 = DisplayStrs30214.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30214").innerHTML = DisplayStrs30214; if (CountActives30214) //alert(SetTimeOutPeriods30214); setTimeout("CountBacks30214(" + (secs+CountSteppers30214) + ")", SetTimeOutPeriods30214); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30214)=="undefined") BackColors30214 = ""; if (typeof(ForeColors30214)=="undefined") ForeColors30214= "white"; if (typeof(TargetDates30214)=="undefined") TargetDates30214 = "04/19/2024 11:00:00 PM"; if (typeof(DisplayFormats30214)=="undefined") DisplayFormats30214 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30214)=="undefined") CountActives30214 = true; if (typeof(FinishMessages30214)=="undefined") FinishMessages30214 = ""; if (typeof(CountSteppers30214)!="number") CountSteppers30214 = -1; if (typeof(LeadingZeros30214)=="undefined") LeadingZeros30214 = true; CountSteppers30214 = Math.ceil(CountSteppers30214); if (CountSteppers30214 == 0) CountActives30214 = false; var SetTimeOutPeriods30214 = (Math.abs(CountSteppers30214)-1)*1000 + 990; puti(BackColors30214, ForeColors30214); var dthens30214 = new Date(TargetDates30214); var dnows30214 = new Date("04/29/2024 9:33:26 PM"); if(CountSteppers30214>0) ddiffs30214 = new Date(dnows30214-dthens30214); else ddiffs30214 = new Date(dthens30214-dnows30214); gsecss30214 = Math.floor(ddiffs30214.valueOf()/1000); CountBacks30214(gsecss30214);