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 (LeadingZeros29929 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29929(secs) { if (secs < 0) { document.getElementById("cntdwns29929").innerHTML = FinishMessages29929; return; } DisplayStrs29929 = DisplayFormats29929.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29929 = DisplayStrs29929.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29929 = DisplayStrs29929.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29929 = DisplayStrs29929.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29929").innerHTML = DisplayStrs29929; if (CountActives29929) //alert(SetTimeOutPeriods29929); setTimeout("CountBacks29929(" + (secs+CountSteppers29929) + ")", SetTimeOutPeriods29929); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29929)=="undefined") BackColors29929 = ""; if (typeof(ForeColors29929)=="undefined") ForeColors29929= "white"; if (typeof(TargetDates29929)=="undefined") TargetDates29929 = "04/25/2024 11:00:00 PM"; if (typeof(DisplayFormats29929)=="undefined") DisplayFormats29929 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29929)=="undefined") CountActives29929 = true; if (typeof(FinishMessages29929)=="undefined") FinishMessages29929 = ""; if (typeof(CountSteppers29929)!="number") CountSteppers29929 = -1; if (typeof(LeadingZeros29929)=="undefined") LeadingZeros29929 = true; CountSteppers29929 = Math.ceil(CountSteppers29929); if (CountSteppers29929 == 0) CountActives29929 = false; var SetTimeOutPeriods29929 = (Math.abs(CountSteppers29929)-1)*1000 + 990; puti(BackColors29929, ForeColors29929); var dthens29929 = new Date(TargetDates29929); var dnows29929 = new Date("05/03/2024 5:21:59 PM"); if(CountSteppers29929>0) ddiffs29929 = new Date(dnows29929-dthens29929); else ddiffs29929 = new Date(dthens29929-dnows29929); gsecss29929 = Math.floor(ddiffs29929.valueOf()/1000); CountBacks29929(gsecss29929);