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 (LeadingZeros30278 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30278(secs) { if (secs < 0) { document.getElementById("cntdwns30278").innerHTML = FinishMessages30278; return; } DisplayStrs30278 = DisplayFormats30278.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30278 = DisplayStrs30278.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30278 = DisplayStrs30278.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30278 = DisplayStrs30278.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30278").innerHTML = DisplayStrs30278; if (CountActives30278) //alert(SetTimeOutPeriods30278); setTimeout("CountBacks30278(" + (secs+CountSteppers30278) + ")", SetTimeOutPeriods30278); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30278)=="undefined") BackColors30278 = ""; if (typeof(ForeColors30278)=="undefined") ForeColors30278= "white"; if (typeof(TargetDates30278)=="undefined") TargetDates30278 = "04/21/2024 10:00:00 PM"; if (typeof(DisplayFormats30278)=="undefined") DisplayFormats30278 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30278)=="undefined") CountActives30278 = true; if (typeof(FinishMessages30278)=="undefined") FinishMessages30278 = ""; if (typeof(CountSteppers30278)!="number") CountSteppers30278 = -1; if (typeof(LeadingZeros30278)=="undefined") LeadingZeros30278 = true; CountSteppers30278 = Math.ceil(CountSteppers30278); if (CountSteppers30278 == 0) CountActives30278 = false; var SetTimeOutPeriods30278 = (Math.abs(CountSteppers30278)-1)*1000 + 990; puti(BackColors30278, ForeColors30278); var dthens30278 = new Date(TargetDates30278); var dnows30278 = new Date("05/02/2024 5:34:32 PM"); if(CountSteppers30278>0) ddiffs30278 = new Date(dnows30278-dthens30278); else ddiffs30278 = new Date(dthens30278-dnows30278); gsecss30278 = Math.floor(ddiffs30278.valueOf()/1000); CountBacks30278(gsecss30278);