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 (LeadingZeros30497 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30497(secs) { if (secs < 0) { document.getElementById("cntdwns30497").innerHTML = FinishMessages30497; return; } DisplayStrs30497 = DisplayFormats30497.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30497 = DisplayStrs30497.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30497 = DisplayStrs30497.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30497 = DisplayStrs30497.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30497").innerHTML = DisplayStrs30497; if (CountActives30497) //alert(SetTimeOutPeriods30497); setTimeout("CountBacks30497(" + (secs+CountSteppers30497) + ")", SetTimeOutPeriods30497); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30497)=="undefined") BackColors30497 = ""; if (typeof(ForeColors30497)=="undefined") ForeColors30497= "white"; if (typeof(TargetDates30497)=="undefined") TargetDates30497 = "05/12/2024 10:00:00 PM"; if (typeof(DisplayFormats30497)=="undefined") DisplayFormats30497 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30497)=="undefined") CountActives30497 = true; if (typeof(FinishMessages30497)=="undefined") FinishMessages30497 = ""; if (typeof(CountSteppers30497)!="number") CountSteppers30497 = -1; if (typeof(LeadingZeros30497)=="undefined") LeadingZeros30497 = true; CountSteppers30497 = Math.ceil(CountSteppers30497); if (CountSteppers30497 == 0) CountActives30497 = false; var SetTimeOutPeriods30497 = (Math.abs(CountSteppers30497)-1)*1000 + 990; puti(BackColors30497, ForeColors30497); var dthens30497 = new Date(TargetDates30497); var dnows30497 = new Date("05/20/2024 12:43:04 PM"); if(CountSteppers30497>0) ddiffs30497 = new Date(dnows30497-dthens30497); else ddiffs30497 = new Date(dthens30497-dnows30497); gsecss30497 = Math.floor(ddiffs30497.valueOf()/1000); CountBacks30497(gsecss30497);