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 (LeadingZeros29985 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29985(secs) { if (secs < 0) { document.getElementById("cntdwns29985").innerHTML = FinishMessages29985; return; } DisplayStrs29985 = DisplayFormats29985.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29985 = DisplayStrs29985.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29985 = DisplayStrs29985.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29985 = DisplayStrs29985.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29985").innerHTML = DisplayStrs29985; if (CountActives29985) //alert(SetTimeOutPeriods29985); setTimeout("CountBacks29985(" + (secs+CountSteppers29985) + ")", SetTimeOutPeriods29985); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29985)=="undefined") BackColors29985 = ""; if (typeof(ForeColors29985)=="undefined") ForeColors29985= "white"; if (typeof(TargetDates29985)=="undefined") TargetDates29985 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats29985)=="undefined") DisplayFormats29985 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29985)=="undefined") CountActives29985 = true; if (typeof(FinishMessages29985)=="undefined") FinishMessages29985 = ""; if (typeof(CountSteppers29985)!="number") CountSteppers29985 = -1; if (typeof(LeadingZeros29985)=="undefined") LeadingZeros29985 = true; CountSteppers29985 = Math.ceil(CountSteppers29985); if (CountSteppers29985 == 0) CountActives29985 = false; var SetTimeOutPeriods29985 = (Math.abs(CountSteppers29985)-1)*1000 + 990; puti(BackColors29985, ForeColors29985); var dthens29985 = new Date(TargetDates29985); var dnows29985 = new Date("05/08/2024 1:27:54 AM"); if(CountSteppers29985>0) ddiffs29985 = new Date(dnows29985-dthens29985); else ddiffs29985 = new Date(dthens29985-dnows29985); gsecss29985 = Math.floor(ddiffs29985.valueOf()/1000); CountBacks29985(gsecss29985);