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 (LeadingZeros29152 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29152(secs) { if (secs < 0) { document.getElementById("cntdwns29152").innerHTML = FinishMessages29152; return; } DisplayStrs29152 = DisplayFormats29152.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29152 = DisplayStrs29152.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29152 = DisplayStrs29152.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29152 = DisplayStrs29152.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29152").innerHTML = DisplayStrs29152; if (CountActives29152) //alert(SetTimeOutPeriods29152); setTimeout("CountBacks29152(" + (secs+CountSteppers29152) + ")", SetTimeOutPeriods29152); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29152)=="undefined") BackColors29152 = ""; if (typeof(ForeColors29152)=="undefined") ForeColors29152= "white"; if (typeof(TargetDates29152)=="undefined") TargetDates29152 = "03/30/2024 10:00:00 PM"; if (typeof(DisplayFormats29152)=="undefined") DisplayFormats29152 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29152)=="undefined") CountActives29152 = true; if (typeof(FinishMessages29152)=="undefined") FinishMessages29152 = ""; if (typeof(CountSteppers29152)!="number") CountSteppers29152 = -1; if (typeof(LeadingZeros29152)=="undefined") LeadingZeros29152 = true; CountSteppers29152 = Math.ceil(CountSteppers29152); if (CountSteppers29152 == 0) CountActives29152 = false; var SetTimeOutPeriods29152 = (Math.abs(CountSteppers29152)-1)*1000 + 990; puti(BackColors29152, ForeColors29152); var dthens29152 = new Date(TargetDates29152); var dnows29152 = new Date("04/27/2024 10:36:44 AM"); if(CountSteppers29152>0) ddiffs29152 = new Date(dnows29152-dthens29152); else ddiffs29152 = new Date(dthens29152-dnows29152); gsecss29152 = Math.floor(ddiffs29152.valueOf()/1000); CountBacks29152(gsecss29152);