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 (LeadingZeros29682 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29682(secs) { if (secs < 0) { document.getElementById("cntdwns29682").innerHTML = FinishMessages29682; return; } DisplayStrs29682 = DisplayFormats29682.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29682 = DisplayStrs29682.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29682 = DisplayStrs29682.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29682 = DisplayStrs29682.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29682").innerHTML = DisplayStrs29682; if (CountActives29682) //alert(SetTimeOutPeriods29682); setTimeout("CountBacks29682(" + (secs+CountSteppers29682) + ")", SetTimeOutPeriods29682); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29682)=="undefined") BackColors29682 = ""; if (typeof(ForeColors29682)=="undefined") ForeColors29682= "white"; if (typeof(TargetDates29682)=="undefined") TargetDates29682 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats29682)=="undefined") DisplayFormats29682 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29682)=="undefined") CountActives29682 = true; if (typeof(FinishMessages29682)=="undefined") FinishMessages29682 = ""; if (typeof(CountSteppers29682)!="number") CountSteppers29682 = -1; if (typeof(LeadingZeros29682)=="undefined") LeadingZeros29682 = true; CountSteppers29682 = Math.ceil(CountSteppers29682); if (CountSteppers29682 == 0) CountActives29682 = false; var SetTimeOutPeriods29682 = (Math.abs(CountSteppers29682)-1)*1000 + 990; puti(BackColors29682, ForeColors29682); var dthens29682 = new Date(TargetDates29682); var dnows29682 = new Date("04/28/2024 11:01:56 PM"); if(CountSteppers29682>0) ddiffs29682 = new Date(dnows29682-dthens29682); else ddiffs29682 = new Date(dthens29682-dnows29682); gsecss29682 = Math.floor(ddiffs29682.valueOf()/1000); CountBacks29682(gsecss29682);