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 (LeadingZeros29218 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29218(secs) { if (secs < 0) { document.getElementById("cntdwns29218").innerHTML = FinishMessages29218; return; } DisplayStrs29218 = DisplayFormats29218.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29218 = DisplayStrs29218.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29218 = DisplayStrs29218.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29218 = DisplayStrs29218.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29218").innerHTML = DisplayStrs29218; if (CountActives29218) //alert(SetTimeOutPeriods29218); setTimeout("CountBacks29218(" + (secs+CountSteppers29218) + ")", SetTimeOutPeriods29218); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29218)=="undefined") BackColors29218 = ""; if (typeof(ForeColors29218)=="undefined") ForeColors29218= "white"; if (typeof(TargetDates29218)=="undefined") TargetDates29218 = "03/31/2024 10:00:00 PM"; if (typeof(DisplayFormats29218)=="undefined") DisplayFormats29218 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29218)=="undefined") CountActives29218 = true; if (typeof(FinishMessages29218)=="undefined") FinishMessages29218 = ""; if (typeof(CountSteppers29218)!="number") CountSteppers29218 = -1; if (typeof(LeadingZeros29218)=="undefined") LeadingZeros29218 = true; CountSteppers29218 = Math.ceil(CountSteppers29218); if (CountSteppers29218 == 0) CountActives29218 = false; var SetTimeOutPeriods29218 = (Math.abs(CountSteppers29218)-1)*1000 + 990; puti(BackColors29218, ForeColors29218); var dthens29218 = new Date(TargetDates29218); var dnows29218 = new Date("04/27/2024 9:56:32 PM"); if(CountSteppers29218>0) ddiffs29218 = new Date(dnows29218-dthens29218); else ddiffs29218 = new Date(dthens29218-dnows29218); gsecss29218 = Math.floor(ddiffs29218.valueOf()/1000); CountBacks29218(gsecss29218);