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 (LeadingZeros29912 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29912(secs) { if (secs < 0) { document.getElementById("cntdwns29912").innerHTML = FinishMessages29912; return; } DisplayStrs29912 = DisplayFormats29912.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29912 = DisplayStrs29912.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29912 = DisplayStrs29912.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29912 = DisplayStrs29912.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29912").innerHTML = DisplayStrs29912; if (CountActives29912) //alert(SetTimeOutPeriods29912); setTimeout("CountBacks29912(" + (secs+CountSteppers29912) + ")", SetTimeOutPeriods29912); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29912)=="undefined") BackColors29912 = ""; if (typeof(ForeColors29912)=="undefined") ForeColors29912= "white"; if (typeof(TargetDates29912)=="undefined") TargetDates29912 = "04/30/2024 11:00:00 PM"; if (typeof(DisplayFormats29912)=="undefined") DisplayFormats29912 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29912)=="undefined") CountActives29912 = true; if (typeof(FinishMessages29912)=="undefined") FinishMessages29912 = ""; if (typeof(CountSteppers29912)!="number") CountSteppers29912 = -1; if (typeof(LeadingZeros29912)=="undefined") LeadingZeros29912 = true; CountSteppers29912 = Math.ceil(CountSteppers29912); if (CountSteppers29912 == 0) CountActives29912 = false; var SetTimeOutPeriods29912 = (Math.abs(CountSteppers29912)-1)*1000 + 990; puti(BackColors29912, ForeColors29912); var dthens29912 = new Date(TargetDates29912); var dnows29912 = new Date("05/09/2024 1:54:46 AM"); if(CountSteppers29912>0) ddiffs29912 = new Date(dnows29912-dthens29912); else ddiffs29912 = new Date(dthens29912-dnows29912); gsecss29912 = Math.floor(ddiffs29912.valueOf()/1000); CountBacks29912(gsecss29912);