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 (LeadingZeros30675 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30675(secs) { if (secs < 0) { document.getElementById("cntdwns30675").innerHTML = FinishMessages30675; return; } DisplayStrs30675 = DisplayFormats30675.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30675 = DisplayStrs30675.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30675 = DisplayStrs30675.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30675 = DisplayStrs30675.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30675").innerHTML = DisplayStrs30675; if (CountActives30675) //alert(SetTimeOutPeriods30675); setTimeout("CountBacks30675(" + (secs+CountSteppers30675) + ")", SetTimeOutPeriods30675); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30675)=="undefined") BackColors30675 = ""; if (typeof(ForeColors30675)=="undefined") ForeColors30675= "white"; if (typeof(TargetDates30675)=="undefined") TargetDates30675 = "07/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30675)=="undefined") DisplayFormats30675 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30675)=="undefined") CountActives30675 = true; if (typeof(FinishMessages30675)=="undefined") FinishMessages30675 = ""; if (typeof(CountSteppers30675)!="number") CountSteppers30675 = -1; if (typeof(LeadingZeros30675)=="undefined") LeadingZeros30675 = true; CountSteppers30675 = Math.ceil(CountSteppers30675); if (CountSteppers30675 == 0) CountActives30675 = false; var SetTimeOutPeriods30675 = (Math.abs(CountSteppers30675)-1)*1000 + 990; puti(BackColors30675, ForeColors30675); var dthens30675 = new Date(TargetDates30675); var dnows30675 = new Date("09/08/2024 2:15:00 AM"); if(CountSteppers30675>0) ddiffs30675 = new Date(dnows30675-dthens30675); else ddiffs30675 = new Date(dthens30675-dnows30675); gsecss30675 = Math.floor(ddiffs30675.valueOf()/1000); CountBacks30675(gsecss30675);