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 (LeadingZeros30354 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30354(secs) { if (secs < 0) { document.getElementById("cntdwns30354").innerHTML = FinishMessages30354; return; } DisplayStrs30354 = DisplayFormats30354.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30354 = DisplayStrs30354.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30354 = DisplayStrs30354.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30354 = DisplayStrs30354.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30354").innerHTML = DisplayStrs30354; if (CountActives30354) //alert(SetTimeOutPeriods30354); setTimeout("CountBacks30354(" + (secs+CountSteppers30354) + ")", SetTimeOutPeriods30354); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30354)=="undefined") BackColors30354 = ""; if (typeof(ForeColors30354)=="undefined") ForeColors30354= "white"; if (typeof(TargetDates30354)=="undefined") TargetDates30354 = "04/19/2024 10:00:00 PM"; if (typeof(DisplayFormats30354)=="undefined") DisplayFormats30354 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30354)=="undefined") CountActives30354 = true; if (typeof(FinishMessages30354)=="undefined") FinishMessages30354 = ""; if (typeof(CountSteppers30354)!="number") CountSteppers30354 = -1; if (typeof(LeadingZeros30354)=="undefined") LeadingZeros30354 = true; CountSteppers30354 = Math.ceil(CountSteppers30354); if (CountSteppers30354 == 0) CountActives30354 = false; var SetTimeOutPeriods30354 = (Math.abs(CountSteppers30354)-1)*1000 + 990; puti(BackColors30354, ForeColors30354); var dthens30354 = new Date(TargetDates30354); var dnows30354 = new Date("04/30/2024 10:00:52 AM"); if(CountSteppers30354>0) ddiffs30354 = new Date(dnows30354-dthens30354); else ddiffs30354 = new Date(dthens30354-dnows30354); gsecss30354 = Math.floor(ddiffs30354.valueOf()/1000); CountBacks30354(gsecss30354);