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 (LeadingZeros29749 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29749(secs) { if (secs < 0) { document.getElementById("cntdwns29749").innerHTML = FinishMessages29749; return; } DisplayStrs29749 = DisplayFormats29749.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29749 = DisplayStrs29749.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29749 = DisplayStrs29749.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29749 = DisplayStrs29749.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29749").innerHTML = DisplayStrs29749; if (CountActives29749) //alert(SetTimeOutPeriods29749); setTimeout("CountBacks29749(" + (secs+CountSteppers29749) + ")", SetTimeOutPeriods29749); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29749)=="undefined") BackColors29749 = ""; if (typeof(ForeColors29749)=="undefined") ForeColors29749= "white"; if (typeof(TargetDates29749)=="undefined") TargetDates29749 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats29749)=="undefined") DisplayFormats29749 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29749)=="undefined") CountActives29749 = true; if (typeof(FinishMessages29749)=="undefined") FinishMessages29749 = ""; if (typeof(CountSteppers29749)!="number") CountSteppers29749 = -1; if (typeof(LeadingZeros29749)=="undefined") LeadingZeros29749 = true; CountSteppers29749 = Math.ceil(CountSteppers29749); if (CountSteppers29749 == 0) CountActives29749 = false; var SetTimeOutPeriods29749 = (Math.abs(CountSteppers29749)-1)*1000 + 990; puti(BackColors29749, ForeColors29749); var dthens29749 = new Date(TargetDates29749); var dnows29749 = new Date("05/04/2024 8:08:31 PM"); if(CountSteppers29749>0) ddiffs29749 = new Date(dnows29749-dthens29749); else ddiffs29749 = new Date(dthens29749-dnows29749); gsecss29749 = Math.floor(ddiffs29749.valueOf()/1000); CountBacks29749(gsecss29749);