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 (LeadingZeros30042 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30042(secs) { if (secs < 0) { document.getElementById("cntdwns30042").innerHTML = FinishMessages30042; return; } DisplayStrs30042 = DisplayFormats30042.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30042 = DisplayStrs30042.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30042 = DisplayStrs30042.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30042 = DisplayStrs30042.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30042").innerHTML = DisplayStrs30042; if (CountActives30042) //alert(SetTimeOutPeriods30042); setTimeout("CountBacks30042(" + (secs+CountSteppers30042) + ")", SetTimeOutPeriods30042); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30042)=="undefined") BackColors30042 = ""; if (typeof(ForeColors30042)=="undefined") ForeColors30042= "white"; if (typeof(TargetDates30042)=="undefined") TargetDates30042 = "04/01/2024 11:00:00 PM"; if (typeof(DisplayFormats30042)=="undefined") DisplayFormats30042 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30042)=="undefined") CountActives30042 = true; if (typeof(FinishMessages30042)=="undefined") FinishMessages30042 = ""; if (typeof(CountSteppers30042)!="number") CountSteppers30042 = -1; if (typeof(LeadingZeros30042)=="undefined") LeadingZeros30042 = true; CountSteppers30042 = Math.ceil(CountSteppers30042); if (CountSteppers30042 == 0) CountActives30042 = false; var SetTimeOutPeriods30042 = (Math.abs(CountSteppers30042)-1)*1000 + 990; puti(BackColors30042, ForeColors30042); var dthens30042 = new Date(TargetDates30042); var dnows30042 = new Date("04/28/2024 11:02:13 PM"); if(CountSteppers30042>0) ddiffs30042 = new Date(dnows30042-dthens30042); else ddiffs30042 = new Date(dthens30042-dnows30042); gsecss30042 = Math.floor(ddiffs30042.valueOf()/1000); CountBacks30042(gsecss30042);