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 (LeadingZeros29719 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29719(secs) { if (secs < 0) { document.getElementById("cntdwns29719").innerHTML = FinishMessages29719; return; } DisplayStrs29719 = DisplayFormats29719.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29719 = DisplayStrs29719.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29719 = DisplayStrs29719.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29719 = DisplayStrs29719.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29719").innerHTML = DisplayStrs29719; if (CountActives29719) //alert(SetTimeOutPeriods29719); setTimeout("CountBacks29719(" + (secs+CountSteppers29719) + ")", SetTimeOutPeriods29719); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29719)=="undefined") BackColors29719 = ""; if (typeof(ForeColors29719)=="undefined") ForeColors29719= "white"; if (typeof(TargetDates29719)=="undefined") TargetDates29719 = "04/01/2024 11:00:00 PM"; if (typeof(DisplayFormats29719)=="undefined") DisplayFormats29719 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29719)=="undefined") CountActives29719 = true; if (typeof(FinishMessages29719)=="undefined") FinishMessages29719 = ""; if (typeof(CountSteppers29719)!="number") CountSteppers29719 = -1; if (typeof(LeadingZeros29719)=="undefined") LeadingZeros29719 = true; CountSteppers29719 = Math.ceil(CountSteppers29719); if (CountSteppers29719 == 0) CountActives29719 = false; var SetTimeOutPeriods29719 = (Math.abs(CountSteppers29719)-1)*1000 + 990; puti(BackColors29719, ForeColors29719); var dthens29719 = new Date(TargetDates29719); var dnows29719 = new Date("04/29/2024 11:43:29 AM"); if(CountSteppers29719>0) ddiffs29719 = new Date(dnows29719-dthens29719); else ddiffs29719 = new Date(dthens29719-dnows29719); gsecss29719 = Math.floor(ddiffs29719.valueOf()/1000); CountBacks29719(gsecss29719);