/* Author: Robert Hashemian (http://www.hashemian.com/) Modified by: Munsifali Rashid (http://www.munit.co.uk/) Modified by: Leandro Sepulveda (http://www.preisfuchstv.com/) Modified by: Marleny Nunez (http://www.preisfuchstv.com/) */ function countdown(obj) { this.obj = obj; this.Div = "clock"; this.BackColor = "white"; this.ForeColor = "black"; this.TargetDate = "12/31/2020 5:00 AM"; this.DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; this.CountActive = true; this.DisplayStr; this.Calcage = cd_Calcage; this.CountBack = cd_CountBack; this.Setup = cd_Setup; } function cd_Calcage(secs, num1, num2) { s = ((Math.floor(secs/num1))%num2).toString(); if (s.length < 2) s = "0" + s; return (s); } function cd_CountBack(secs) { if (secs == 'null') { var dTemp = new Date(this.TargetDate); this.phpDate = "02/08/2012 18:20:48 GMT"; do { dTemp.setUTCDate(dTemp.getUTCDate()+30); var dthen = new Date(dTemp); var dnow = new Date(this.phpDate); ddiff = new Date(dthen-dnow); gsecs = Math.floor(ddiff.valueOf()/1000); } while (gsecs < 0); this.CountBack(gsecs); // this.DisplayStr = '