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 (LeadingZeros29579 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29579(secs) { if (secs < 0) { document.getElementById("cntdwns29579").innerHTML = FinishMessages29579; return; } DisplayStrs29579 = DisplayFormats29579.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29579 = DisplayStrs29579.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29579 = DisplayStrs29579.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29579 = DisplayStrs29579.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29579").innerHTML = DisplayStrs29579; if (CountActives29579) //alert(SetTimeOutPeriods29579); setTimeout("CountBacks29579(" + (secs+CountSteppers29579) + ")", SetTimeOutPeriods29579); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29579)=="undefined") BackColors29579 = ""; if (typeof(ForeColors29579)=="undefined") ForeColors29579= "white"; if (typeof(TargetDates29579)=="undefined") TargetDates29579 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats29579)=="undefined") DisplayFormats29579 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29579)=="undefined") CountActives29579 = true; if (typeof(FinishMessages29579)=="undefined") FinishMessages29579 = ""; if (typeof(CountSteppers29579)!="number") CountSteppers29579 = -1; if (typeof(LeadingZeros29579)=="undefined") LeadingZeros29579 = true; CountSteppers29579 = Math.ceil(CountSteppers29579); if (CountSteppers29579 == 0) CountActives29579 = false; var SetTimeOutPeriods29579 = (Math.abs(CountSteppers29579)-1)*1000 + 990; puti(BackColors29579, ForeColors29579); var dthens29579 = new Date(TargetDates29579); var dnows29579 = new Date("04/29/2024 3:09:38 AM"); if(CountSteppers29579>0) ddiffs29579 = new Date(dnows29579-dthens29579); else ddiffs29579 = new Date(dthens29579-dnows29579); gsecss29579 = Math.floor(ddiffs29579.valueOf()/1000); CountBacks29579(gsecss29579);