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 (LeadingZeros29357 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29357(secs) { if (secs < 0) { document.getElementById("cntdwns29357").innerHTML = FinishMessages29357; return; } DisplayStrs29357 = DisplayFormats29357.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29357 = DisplayStrs29357.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29357 = DisplayStrs29357.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29357 = DisplayStrs29357.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29357").innerHTML = DisplayStrs29357; if (CountActives29357) //alert(SetTimeOutPeriods29357); setTimeout("CountBacks29357(" + (secs+CountSteppers29357) + ")", SetTimeOutPeriods29357); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29357)=="undefined") BackColors29357 = ""; if (typeof(ForeColors29357)=="undefined") ForeColors29357= "white"; if (typeof(TargetDates29357)=="undefined") TargetDates29357 = "04/01/2024 11:00:00 PM"; if (typeof(DisplayFormats29357)=="undefined") DisplayFormats29357 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29357)=="undefined") CountActives29357 = true; if (typeof(FinishMessages29357)=="undefined") FinishMessages29357 = ""; if (typeof(CountSteppers29357)!="number") CountSteppers29357 = -1; if (typeof(LeadingZeros29357)=="undefined") LeadingZeros29357 = true; CountSteppers29357 = Math.ceil(CountSteppers29357); if (CountSteppers29357 == 0) CountActives29357 = false; var SetTimeOutPeriods29357 = (Math.abs(CountSteppers29357)-1)*1000 + 990; puti(BackColors29357, ForeColors29357); var dthens29357 = new Date(TargetDates29357); var dnows29357 = new Date("04/29/2024 1:16:53 PM"); if(CountSteppers29357>0) ddiffs29357 = new Date(dnows29357-dthens29357); else ddiffs29357 = new Date(dthens29357-dnows29357); gsecss29357 = Math.floor(ddiffs29357.valueOf()/1000); CountBacks29357(gsecss29357);