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 (LeadingZeros30160 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30160(secs) { if (secs < 0) { document.getElementById("cntdwns30160").innerHTML = FinishMessages30160; return; } DisplayStrs30160 = DisplayFormats30160.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30160 = DisplayStrs30160.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30160 = DisplayStrs30160.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30160 = DisplayStrs30160.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30160").innerHTML = DisplayStrs30160; if (CountActives30160) //alert(SetTimeOutPeriods30160); setTimeout("CountBacks30160(" + (secs+CountSteppers30160) + ")", SetTimeOutPeriods30160); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30160)=="undefined") BackColors30160 = ""; if (typeof(ForeColors30160)=="undefined") ForeColors30160= "white"; if (typeof(TargetDates30160)=="undefined") TargetDates30160 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30160)=="undefined") DisplayFormats30160 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30160)=="undefined") CountActives30160 = true; if (typeof(FinishMessages30160)=="undefined") FinishMessages30160 = ""; if (typeof(CountSteppers30160)!="number") CountSteppers30160 = -1; if (typeof(LeadingZeros30160)=="undefined") LeadingZeros30160 = true; CountSteppers30160 = Math.ceil(CountSteppers30160); if (CountSteppers30160 == 0) CountActives30160 = false; var SetTimeOutPeriods30160 = (Math.abs(CountSteppers30160)-1)*1000 + 990; puti(BackColors30160, ForeColors30160); var dthens30160 = new Date(TargetDates30160); var dnows30160 = new Date("05/04/2024 10:08:59 PM"); if(CountSteppers30160>0) ddiffs30160 = new Date(dnows30160-dthens30160); else ddiffs30160 = new Date(dthens30160-dnows30160); gsecss30160 = Math.floor(ddiffs30160.valueOf()/1000); CountBacks30160(gsecss30160);