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 (LeadingZeros30066 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30066(secs) { if (secs < 0) { document.getElementById("cntdwns30066").innerHTML = FinishMessages30066; return; } DisplayStrs30066 = DisplayFormats30066.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30066 = DisplayStrs30066.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30066 = DisplayStrs30066.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30066 = DisplayStrs30066.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30066").innerHTML = DisplayStrs30066; if (CountActives30066) //alert(SetTimeOutPeriods30066); setTimeout("CountBacks30066(" + (secs+CountSteppers30066) + ")", SetTimeOutPeriods30066); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30066)=="undefined") BackColors30066 = ""; if (typeof(ForeColors30066)=="undefined") ForeColors30066= "white"; if (typeof(TargetDates30066)=="undefined") TargetDates30066 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats30066)=="undefined") DisplayFormats30066 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30066)=="undefined") CountActives30066 = true; if (typeof(FinishMessages30066)=="undefined") FinishMessages30066 = ""; if (typeof(CountSteppers30066)!="number") CountSteppers30066 = -1; if (typeof(LeadingZeros30066)=="undefined") LeadingZeros30066 = true; CountSteppers30066 = Math.ceil(CountSteppers30066); if (CountSteppers30066 == 0) CountActives30066 = false; var SetTimeOutPeriods30066 = (Math.abs(CountSteppers30066)-1)*1000 + 990; puti(BackColors30066, ForeColors30066); var dthens30066 = new Date(TargetDates30066); var dnows30066 = new Date("04/28/2024 11:45:36 PM"); if(CountSteppers30066>0) ddiffs30066 = new Date(dnows30066-dthens30066); else ddiffs30066 = new Date(dthens30066-dnows30066); gsecss30066 = Math.floor(ddiffs30066.valueOf()/1000); CountBacks30066(gsecss30066);