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 (LeadingZeros29978 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29978(secs) { if (secs < 0) { document.getElementById("cntdwns29978").innerHTML = FinishMessages29978; return; } DisplayStrs29978 = DisplayFormats29978.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29978 = DisplayStrs29978.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29978 = DisplayStrs29978.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29978 = DisplayStrs29978.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29978").innerHTML = DisplayStrs29978; if (CountActives29978) //alert(SetTimeOutPeriods29978); setTimeout("CountBacks29978(" + (secs+CountSteppers29978) + ")", SetTimeOutPeriods29978); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29978)=="undefined") BackColors29978 = ""; if (typeof(ForeColors29978)=="undefined") ForeColors29978= "white"; if (typeof(TargetDates29978)=="undefined") TargetDates29978 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats29978)=="undefined") DisplayFormats29978 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29978)=="undefined") CountActives29978 = true; if (typeof(FinishMessages29978)=="undefined") FinishMessages29978 = ""; if (typeof(CountSteppers29978)!="number") CountSteppers29978 = -1; if (typeof(LeadingZeros29978)=="undefined") LeadingZeros29978 = true; CountSteppers29978 = Math.ceil(CountSteppers29978); if (CountSteppers29978 == 0) CountActives29978 = false; var SetTimeOutPeriods29978 = (Math.abs(CountSteppers29978)-1)*1000 + 990; puti(BackColors29978, ForeColors29978); var dthens29978 = new Date(TargetDates29978); var dnows29978 = new Date("05/06/2024 5:54:15 PM"); if(CountSteppers29978>0) ddiffs29978 = new Date(dnows29978-dthens29978); else ddiffs29978 = new Date(dthens29978-dnows29978); gsecss29978 = Math.floor(ddiffs29978.valueOf()/1000); CountBacks29978(gsecss29978);