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 (LeadingZeros29898 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29898(secs) { if (secs < 0) { document.getElementById("cntdwns29898").innerHTML = FinishMessages29898; return; } DisplayStrs29898 = DisplayFormats29898.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29898 = DisplayStrs29898.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29898 = DisplayStrs29898.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29898 = DisplayStrs29898.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29898").innerHTML = DisplayStrs29898; if (CountActives29898) //alert(SetTimeOutPeriods29898); setTimeout("CountBacks29898(" + (secs+CountSteppers29898) + ")", SetTimeOutPeriods29898); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29898)=="undefined") BackColors29898 = ""; if (typeof(ForeColors29898)=="undefined") ForeColors29898= "white"; if (typeof(TargetDates29898)=="undefined") TargetDates29898 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats29898)=="undefined") DisplayFormats29898 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29898)=="undefined") CountActives29898 = true; if (typeof(FinishMessages29898)=="undefined") FinishMessages29898 = ""; if (typeof(CountSteppers29898)!="number") CountSteppers29898 = -1; if (typeof(LeadingZeros29898)=="undefined") LeadingZeros29898 = true; CountSteppers29898 = Math.ceil(CountSteppers29898); if (CountSteppers29898 == 0) CountActives29898 = false; var SetTimeOutPeriods29898 = (Math.abs(CountSteppers29898)-1)*1000 + 990; puti(BackColors29898, ForeColors29898); var dthens29898 = new Date(TargetDates29898); var dnows29898 = new Date("05/06/2024 12:10:11 PM"); if(CountSteppers29898>0) ddiffs29898 = new Date(dnows29898-dthens29898); else ddiffs29898 = new Date(dthens29898-dnows29898); gsecss29898 = Math.floor(ddiffs29898.valueOf()/1000); CountBacks29898(gsecss29898);