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 (LeadingZeros30100 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30100(secs) { if (secs < 0) { document.getElementById("cntdwns30100").innerHTML = FinishMessages30100; return; } DisplayStrs30100 = DisplayFormats30100.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30100 = DisplayStrs30100.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30100 = DisplayStrs30100.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30100 = DisplayStrs30100.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30100").innerHTML = DisplayStrs30100; if (CountActives30100) //alert(SetTimeOutPeriods30100); setTimeout("CountBacks30100(" + (secs+CountSteppers30100) + ")", SetTimeOutPeriods30100); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30100)=="undefined") BackColors30100 = ""; if (typeof(ForeColors30100)=="undefined") ForeColors30100= "white"; if (typeof(TargetDates30100)=="undefined") TargetDates30100 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats30100)=="undefined") DisplayFormats30100 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30100)=="undefined") CountActives30100 = true; if (typeof(FinishMessages30100)=="undefined") FinishMessages30100 = ""; if (typeof(CountSteppers30100)!="number") CountSteppers30100 = -1; if (typeof(LeadingZeros30100)=="undefined") LeadingZeros30100 = true; CountSteppers30100 = Math.ceil(CountSteppers30100); if (CountSteppers30100 == 0) CountActives30100 = false; var SetTimeOutPeriods30100 = (Math.abs(CountSteppers30100)-1)*1000 + 990; puti(BackColors30100, ForeColors30100); var dthens30100 = new Date(TargetDates30100); var dnows30100 = new Date("04/29/2024 12:26:01 PM"); if(CountSteppers30100>0) ddiffs30100 = new Date(dnows30100-dthens30100); else ddiffs30100 = new Date(dthens30100-dnows30100); gsecss30100 = Math.floor(ddiffs30100.valueOf()/1000); CountBacks30100(gsecss30100);