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 (LeadingZeros30090 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30090(secs) { if (secs < 0) { document.getElementById("cntdwns30090").innerHTML = FinishMessages30090; return; } DisplayStrs30090 = DisplayFormats30090.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30090 = DisplayStrs30090.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30090 = DisplayStrs30090.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30090 = DisplayStrs30090.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30090").innerHTML = DisplayStrs30090; if (CountActives30090) //alert(SetTimeOutPeriods30090); setTimeout("CountBacks30090(" + (secs+CountSteppers30090) + ")", SetTimeOutPeriods30090); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30090)=="undefined") BackColors30090 = ""; if (typeof(ForeColors30090)=="undefined") ForeColors30090= "white"; if (typeof(TargetDates30090)=="undefined") TargetDates30090 = "04/01/2024 11:00:00 PM"; if (typeof(DisplayFormats30090)=="undefined") DisplayFormats30090 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30090)=="undefined") CountActives30090 = true; if (typeof(FinishMessages30090)=="undefined") FinishMessages30090 = ""; if (typeof(CountSteppers30090)!="number") CountSteppers30090 = -1; if (typeof(LeadingZeros30090)=="undefined") LeadingZeros30090 = true; CountSteppers30090 = Math.ceil(CountSteppers30090); if (CountSteppers30090 == 0) CountActives30090 = false; var SetTimeOutPeriods30090 = (Math.abs(CountSteppers30090)-1)*1000 + 990; puti(BackColors30090, ForeColors30090); var dthens30090 = new Date(TargetDates30090); var dnows30090 = new Date("04/29/2024 12:15:59 PM"); if(CountSteppers30090>0) ddiffs30090 = new Date(dnows30090-dthens30090); else ddiffs30090 = new Date(dthens30090-dnows30090); gsecss30090 = Math.floor(ddiffs30090.valueOf()/1000); CountBacks30090(gsecss30090);