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 (LeadingZeros30415 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30415(secs) { if (secs < 0) { document.getElementById("cntdwns30415").innerHTML = FinishMessages30415; return; } DisplayStrs30415 = DisplayFormats30415.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30415 = DisplayStrs30415.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30415 = DisplayStrs30415.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30415 = DisplayStrs30415.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30415").innerHTML = DisplayStrs30415; if (CountActives30415) //alert(SetTimeOutPeriods30415); setTimeout("CountBacks30415(" + (secs+CountSteppers30415) + ")", SetTimeOutPeriods30415); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30415)=="undefined") BackColors30415 = ""; if (typeof(ForeColors30415)=="undefined") ForeColors30415= "white"; if (typeof(TargetDates30415)=="undefined") TargetDates30415 = "04/22/2024 10:00:00 PM"; if (typeof(DisplayFormats30415)=="undefined") DisplayFormats30415 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30415)=="undefined") CountActives30415 = true; if (typeof(FinishMessages30415)=="undefined") FinishMessages30415 = ""; if (typeof(CountSteppers30415)!="number") CountSteppers30415 = -1; if (typeof(LeadingZeros30415)=="undefined") LeadingZeros30415 = true; CountSteppers30415 = Math.ceil(CountSteppers30415); if (CountSteppers30415 == 0) CountActives30415 = false; var SetTimeOutPeriods30415 = (Math.abs(CountSteppers30415)-1)*1000 + 990; puti(BackColors30415, ForeColors30415); var dthens30415 = new Date(TargetDates30415); var dnows30415 = new Date("05/02/2024 4:37:08 PM"); if(CountSteppers30415>0) ddiffs30415 = new Date(dnows30415-dthens30415); else ddiffs30415 = new Date(dthens30415-dnows30415); gsecss30415 = Math.floor(ddiffs30415.valueOf()/1000); CountBacks30415(gsecss30415);