/* Author: Robert Hashemian, modified by Cosmin Cioranu [cauta pe FB(i)] http://www.hashemian.com/ You can use this code in any manner so long as the author's name, Web address and this disclaimer is kept intact. */ //TargetDate = "12/31/2020 5:00 AM"; var TargetDate184 = "12/19/2016 00:00"; var SourceDate184 = "10/19/2018 14:52:59"; //var BackColor184; //var ForeColor184; var DisplayFormat184; var FinishMessage184; var LeadingZero184; //if(!BackColor184) BackColor184 = "palegreen"; //if (BackColor) BackColor184=BackColor; //if(!ForeColor184) ForeColor184 = "navy"; //if (ForeColor) ForeColor184=ForeColor; CountActive184 = true; CountStepper184 = -1; LeadingZero184 = true; if(!DisplayFormat184) DisplayFormat184 = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; if (DisplayFormat) DisplayFormat184=DisplayFormat; if(!FinishMessage184) FinishMessage184 = "Closed!"; if (FinishMessage) FinishMessage184=FinishMessage; function calcage184(secs, num1, num2) { s = ((Math.floor(secs/num1))%num2).toString(); if (LeadingZero184 && s.length < 2) s = "0" + s; return "" + s + ""; } function CountBack184(secs) { if (secs < 0) { document.getElementById("cntdwn184").innerHTML = FinishMessage; return; } DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage184(secs,86400,100000)); DisplayStr = DisplayStr.replace(/%%H%%/g, calcage184(secs,3600,24)); DisplayStr = DisplayStr.replace(/%%M%%/g, calcage184(secs,60,60)); DisplayStr = DisplayStr.replace(/%%S%%/g, calcage184(secs,1,60)); document.getElementById("cntdwn184").innerHTML = DisplayStr; if (CountActive184) setTimeout("CountBack184(" + (secs+CountStepper184) + ")", SetTimeOutPeriod184); } function putspan184() { document.write(""); } //if (typeof(BackColor184)=="undefined") // BackColor184 = "white"; //if (typeof(ForeColor184)=="undefined") // ForeColor184= "black"; if (typeof(TargetDate184)=="undefined") TargetDate184 = "12/31/2020 5:00 AM"; if (typeof(DisplayFormat184)=="undefined") DisplayFormat184 = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; if (typeof(CountActive184)=="undefined") CountActive184 = true; if (typeof(FinishMessage184)=="undefined") FinishMessage184 = ""; if (typeof(CountStepper184)!="number") CountStepper184 = -1; if (typeof(LeadingZero184)=="undefined") LeadingZero184 = true; CountStepper184 = Math.ceil(CountStepper184); if (CountStepper184 == 0) CountActive184 = false; var SetTimeOutPeriod184 = (Math.abs(CountStepper184)-1)*1000 + 990; //putspan184(BackColor184, ForeColor184); putspan184(); var dthen184 = new Date(TargetDate184); var dnow184 = new Date(SourceDate184); if(CountStepper184>0) ddiff184 = new Date(dnow184-dthen184); else ddiff184 = new Date(dthen184-dnow184); gsecs184 = Math.floor(ddiff184.valueOf()/1000); CountBack184(gsecs184);