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 (LeadingZeros30357 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30357(secs) { if (secs < 0) { document.getElementById("cntdwns30357").innerHTML = FinishMessages30357; return; } DisplayStrs30357 = DisplayFormats30357.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30357 = DisplayStrs30357.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30357 = DisplayStrs30357.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30357 = DisplayStrs30357.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30357").innerHTML = DisplayStrs30357; if (CountActives30357) //alert(SetTimeOutPeriods30357); setTimeout("CountBacks30357(" + (secs+CountSteppers30357) + ")", SetTimeOutPeriods30357); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30357)=="undefined") BackColors30357 = ""; if (typeof(ForeColors30357)=="undefined") ForeColors30357= "white"; if (typeof(TargetDates30357)=="undefined") TargetDates30357 = "04/28/2024 10:00:00 PM"; if (typeof(DisplayFormats30357)=="undefined") DisplayFormats30357 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30357)=="undefined") CountActives30357 = true; if (typeof(FinishMessages30357)=="undefined") FinishMessages30357 = ""; if (typeof(CountSteppers30357)!="number") CountSteppers30357 = -1; if (typeof(LeadingZeros30357)=="undefined") LeadingZeros30357 = true; CountSteppers30357 = Math.ceil(CountSteppers30357); if (CountSteppers30357 == 0) CountActives30357 = false; var SetTimeOutPeriods30357 = (Math.abs(CountSteppers30357)-1)*1000 + 990; puti(BackColors30357, ForeColors30357); var dthens30357 = new Date(TargetDates30357); var dnows30357 = new Date("05/04/2024 1:34:45 PM"); if(CountSteppers30357>0) ddiffs30357 = new Date(dnows30357-dthens30357); else ddiffs30357 = new Date(dthens30357-dnows30357); gsecss30357 = Math.floor(ddiffs30357.valueOf()/1000); CountBacks30357(gsecss30357);