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 (LeadingZeros29220 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29220(secs) { if (secs < 0) { document.getElementById("cntdwns29220").innerHTML = FinishMessages29220; return; } DisplayStrs29220 = DisplayFormats29220.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29220 = DisplayStrs29220.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29220 = DisplayStrs29220.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29220 = DisplayStrs29220.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29220").innerHTML = DisplayStrs29220; if (CountActives29220) //alert(SetTimeOutPeriods29220); setTimeout("CountBacks29220(" + (secs+CountSteppers29220) + ")", SetTimeOutPeriods29220); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29220)=="undefined") BackColors29220 = ""; if (typeof(ForeColors29220)=="undefined") ForeColors29220= "white"; if (typeof(TargetDates29220)=="undefined") TargetDates29220 = "03/30/2024 9:00:00 PM"; if (typeof(DisplayFormats29220)=="undefined") DisplayFormats29220 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29220)=="undefined") CountActives29220 = true; if (typeof(FinishMessages29220)=="undefined") FinishMessages29220 = ""; if (typeof(CountSteppers29220)!="number") CountSteppers29220 = -1; if (typeof(LeadingZeros29220)=="undefined") LeadingZeros29220 = true; CountSteppers29220 = Math.ceil(CountSteppers29220); if (CountSteppers29220 == 0) CountActives29220 = false; var SetTimeOutPeriods29220 = (Math.abs(CountSteppers29220)-1)*1000 + 990; puti(BackColors29220, ForeColors29220); var dthens29220 = new Date(TargetDates29220); var dnows29220 = new Date("04/27/2024 2:42:57 PM"); if(CountSteppers29220>0) ddiffs29220 = new Date(dnows29220-dthens29220); else ddiffs29220 = new Date(dthens29220-dnows29220); gsecss29220 = Math.floor(ddiffs29220.valueOf()/1000); CountBacks29220(gsecss29220);