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 (LeadingZeros30548 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30548(secs) { if (secs < 0) { document.getElementById("cntdwns30548").innerHTML = FinishMessages30548; return; } DisplayStrs30548 = DisplayFormats30548.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30548 = DisplayStrs30548.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30548 = DisplayStrs30548.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30548 = DisplayStrs30548.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30548").innerHTML = DisplayStrs30548; if (CountActives30548) //alert(SetTimeOutPeriods30548); setTimeout("CountBacks30548(" + (secs+CountSteppers30548) + ")", SetTimeOutPeriods30548); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30548)=="undefined") BackColors30548 = ""; if (typeof(ForeColors30548)=="undefined") ForeColors30548= "white"; if (typeof(TargetDates30548)=="undefined") TargetDates30548 = "07/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30548)=="undefined") DisplayFormats30548 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30548)=="undefined") CountActives30548 = true; if (typeof(FinishMessages30548)=="undefined") FinishMessages30548 = ""; if (typeof(CountSteppers30548)!="number") CountSteppers30548 = -1; if (typeof(LeadingZeros30548)=="undefined") LeadingZeros30548 = true; CountSteppers30548 = Math.ceil(CountSteppers30548); if (CountSteppers30548 == 0) CountActives30548 = false; var SetTimeOutPeriods30548 = (Math.abs(CountSteppers30548)-1)*1000 + 990; puti(BackColors30548, ForeColors30548); var dthens30548 = new Date(TargetDates30548); var dnows30548 = new Date("09/08/2024 2:22:21 AM"); if(CountSteppers30548>0) ddiffs30548 = new Date(dnows30548-dthens30548); else ddiffs30548 = new Date(dthens30548-dnows30548); gsecss30548 = Math.floor(ddiffs30548.valueOf()/1000); CountBacks30548(gsecss30548);