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 (LeadingZeros29702 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29702(secs) { if (secs < 0) { document.getElementById("cntdwns29702").innerHTML = FinishMessages29702; return; } DisplayStrs29702 = DisplayFormats29702.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29702 = DisplayStrs29702.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29702 = DisplayStrs29702.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29702 = DisplayStrs29702.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29702").innerHTML = DisplayStrs29702; if (CountActives29702) //alert(SetTimeOutPeriods29702); setTimeout("CountBacks29702(" + (secs+CountSteppers29702) + ")", SetTimeOutPeriods29702); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29702)=="undefined") BackColors29702 = ""; if (typeof(ForeColors29702)=="undefined") ForeColors29702= "white"; if (typeof(TargetDates29702)=="undefined") TargetDates29702 = "04/22/2024 11:00:00 PM"; if (typeof(DisplayFormats29702)=="undefined") DisplayFormats29702 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29702)=="undefined") CountActives29702 = true; if (typeof(FinishMessages29702)=="undefined") FinishMessages29702 = ""; if (typeof(CountSteppers29702)!="number") CountSteppers29702 = -1; if (typeof(LeadingZeros29702)=="undefined") LeadingZeros29702 = true; CountSteppers29702 = Math.ceil(CountSteppers29702); if (CountSteppers29702 == 0) CountActives29702 = false; var SetTimeOutPeriods29702 = (Math.abs(CountSteppers29702)-1)*1000 + 990; puti(BackColors29702, ForeColors29702); var dthens29702 = new Date(TargetDates29702); var dnows29702 = new Date("05/03/2024 12:25:21 AM"); if(CountSteppers29702>0) ddiffs29702 = new Date(dnows29702-dthens29702); else ddiffs29702 = new Date(dthens29702-dnows29702); gsecss29702 = Math.floor(ddiffs29702.valueOf()/1000); CountBacks29702(gsecss29702);