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 (LeadingZeros30456 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30456(secs) { if (secs < 0) { document.getElementById("cntdwns30456").innerHTML = FinishMessages30456; return; } DisplayStrs30456 = DisplayFormats30456.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30456 = DisplayStrs30456.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30456 = DisplayStrs30456.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30456 = DisplayStrs30456.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30456").innerHTML = DisplayStrs30456; if (CountActives30456) //alert(SetTimeOutPeriods30456); setTimeout("CountBacks30456(" + (secs+CountSteppers30456) + ")", SetTimeOutPeriods30456); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30456)=="undefined") BackColors30456 = ""; if (typeof(ForeColors30456)=="undefined") ForeColors30456= "white"; if (typeof(TargetDates30456)=="undefined") TargetDates30456 = "04/28/2024 10:00:00 PM"; if (typeof(DisplayFormats30456)=="undefined") DisplayFormats30456 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30456)=="undefined") CountActives30456 = true; if (typeof(FinishMessages30456)=="undefined") FinishMessages30456 = ""; if (typeof(CountSteppers30456)!="number") CountSteppers30456 = -1; if (typeof(LeadingZeros30456)=="undefined") LeadingZeros30456 = true; CountSteppers30456 = Math.ceil(CountSteppers30456); if (CountSteppers30456 == 0) CountActives30456 = false; var SetTimeOutPeriods30456 = (Math.abs(CountSteppers30456)-1)*1000 + 990; puti(BackColors30456, ForeColors30456); var dthens30456 = new Date(TargetDates30456); var dnows30456 = new Date("05/06/2024 2:48:50 PM"); if(CountSteppers30456>0) ddiffs30456 = new Date(dnows30456-dthens30456); else ddiffs30456 = new Date(dthens30456-dnows30456); gsecss30456 = Math.floor(ddiffs30456.valueOf()/1000); CountBacks30456(gsecss30456);