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 (LeadingZeros29788 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29788(secs) { if (secs < 0) { document.getElementById("cntdwns29788").innerHTML = FinishMessages29788; return; } DisplayStrs29788 = DisplayFormats29788.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29788 = DisplayStrs29788.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29788 = DisplayStrs29788.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29788 = DisplayStrs29788.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29788").innerHTML = DisplayStrs29788; if (CountActives29788) //alert(SetTimeOutPeriods29788); setTimeout("CountBacks29788(" + (secs+CountSteppers29788) + ")", SetTimeOutPeriods29788); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29788)=="undefined") BackColors29788 = ""; if (typeof(ForeColors29788)=="undefined") ForeColors29788= "white"; if (typeof(TargetDates29788)=="undefined") TargetDates29788 = "04/21/2024 11:00:00 PM"; if (typeof(DisplayFormats29788)=="undefined") DisplayFormats29788 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29788)=="undefined") CountActives29788 = true; if (typeof(FinishMessages29788)=="undefined") FinishMessages29788 = ""; if (typeof(CountSteppers29788)!="number") CountSteppers29788 = -1; if (typeof(LeadingZeros29788)=="undefined") LeadingZeros29788 = true; CountSteppers29788 = Math.ceil(CountSteppers29788); if (CountSteppers29788 == 0) CountActives29788 = false; var SetTimeOutPeriods29788 = (Math.abs(CountSteppers29788)-1)*1000 + 990; puti(BackColors29788, ForeColors29788); var dthens29788 = new Date(TargetDates29788); var dnows29788 = new Date("05/03/2024 2:02:21 AM"); if(CountSteppers29788>0) ddiffs29788 = new Date(dnows29788-dthens29788); else ddiffs29788 = new Date(dthens29788-dnows29788); gsecss29788 = Math.floor(ddiffs29788.valueOf()/1000); CountBacks29788(gsecss29788);