/* 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 TargetDate208 = "10/10/2017 16:00"; var SourceDate208 = "02/25/2018 11:35:27"; //var BackColor208; //var ForeColor208; var DisplayFormat208; var FinishMessage208; var LeadingZero208; //if(!BackColor208) BackColor208 = "palegreen"; //if (BackColor) BackColor208=BackColor; //if(!ForeColor208) ForeColor208 = "navy"; //if (ForeColor) ForeColor208=ForeColor; CountActive208 = true; CountStepper208 = -1; LeadingZero208 = true; if(!DisplayFormat208) DisplayFormat208 = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; if (DisplayFormat) DisplayFormat208=DisplayFormat; if(!FinishMessage208) FinishMessage208 = "Closed!"; if (FinishMessage) FinishMessage208=FinishMessage; function calcage208(secs, num1, num2) { s = ((Math.floor(secs/num1))%num2).toString(); if (LeadingZero208 && s.length < 2) s = "0" + s; return "" + s + ""; } function CountBack208(secs) { if (secs < 0) { document.getElementById("cntdwn208").innerHTML = FinishMessage; return; } DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage208(secs,86400,100000)); DisplayStr = DisplayStr.replace(/%%H%%/g, calcage208(secs,3600,24)); DisplayStr = DisplayStr.replace(/%%M%%/g, calcage208(secs,60,60)); DisplayStr = DisplayStr.replace(/%%S%%/g, calcage208(secs,1,60)); document.getElementById("cntdwn208").innerHTML = DisplayStr; if (CountActive208) setTimeout("CountBack208(" + (secs+CountStepper208) + ")", SetTimeOutPeriod208); } function putspan208() { document.write(""); } //if (typeof(BackColor208)=="undefined") // BackColor208 = "white"; //if (typeof(ForeColor208)=="undefined") // ForeColor208= "black"; if (typeof(TargetDate208)=="undefined") TargetDate208 = "12/31/2020 5:00 AM"; if (typeof(DisplayFormat208)=="undefined") DisplayFormat208 = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; if (typeof(CountActive208)=="undefined") CountActive208 = true; if (typeof(FinishMessage208)=="undefined") FinishMessage208 = ""; if (typeof(CountStepper208)!="number") CountStepper208 = -1; if (typeof(LeadingZero208)=="undefined") LeadingZero208 = true; CountStepper208 = Math.ceil(CountStepper208); if (CountStepper208 == 0) CountActive208 = false; var SetTimeOutPeriod208 = (Math.abs(CountStepper208)-1)*1000 + 990; //putspan208(BackColor208, ForeColor208); putspan208(); var dthen208 = new Date(TargetDate208); var dnow208 = new Date(SourceDate208); if(CountStepper208>0) ddiff208 = new Date(dnow208-dthen208); else ddiff208 = new Date(dthen208-dnow208); gsecs208 = Math.floor(ddiff208.valueOf()/1000); CountBack208(gsecs208);