document.write ('<div id="clock">&nbsp;</div>');

var yr = 2010;
var mo = 10;
var da = 31;
var montharray = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countdown_seconds(){
 var today = new Date();
 var todayy = today.getUTCFullYear();
 if (todayy < 1000)
 todayy+=1900;
 var todaym = today.getUTCMonth();
 var todayd = today.getUTCDate();
 var todayh = today.getUTCHours();
 var todaymin = today.getUTCMinutes();
 var todaysec = today.getUTCSeconds();
 var todaystring = montharray[todaym] + " " + todayd + ", " + todayy + " " + todayh + ":" + todaymin + ":" + todaysec;
 var draftstring = montharray[mo-1] + " " + da + ", " + yr;

//need to add milliseconds for time of event in UTC time, which is 5 hours ahead of eastern.
//So for nba playoffs, 8pm ET is 24 UT (daylight savings), so take 12 * 60 * 60 * 1000
 var dd = (Date.parse(draftstring) - Date.parse(todaystring)) + (14400000);

 dday=Math.floor(dd/(60*60*1000*24)*1);
 // TO SHOW DAYS
   dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
 // TO SHOW HOURS
 //dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) + dday*24;
 dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
 dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);

 dday = (dday < 0) ? 0 : dday;

dhour = dhour + 3;

 dhour = (dhour < 0) ? 0 : dhour;
 dmin = (dmin < 0) ? 0 : dmin;
 dsec = (dsec < 0) ? 0 : dsec;
 var dayWord = "Days"
 var hourWord = "Hours"
 var minWord = "Minutes"
 var secWord = "Seconds"
 var hourPre = ""
 var minPre = ""
 var secPre = ""

 if (dday == 1 ) { dayWord = "Day" }
 if (dhour == 1 ) { hourWord = "Hour" }
 if (dmin == 1 ) { minWord = "Minute" }
 if (dsec == 1 ) { secWord = "Second" }

// if (dhour < 10) { hourPre = "0" }
 if (dmin < 10) { minPre = "0" }
 if (dsec < 10) { secPre = "0" }

// CONVERY DAYS INTO HOURS
//totalHrs = dday * 24;
//dhour = dhour + totalHrs;

//if (dhour < 10) { hourPre = "0" }

document.getElementById('clock').innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HALLOWEEN COUNTDOWN : " + dday + " DAYS : " + hourPre + dhour + " HOURS : " + minPre + dmin + " MINUTES : " + secPre + dsec + " SECONDS";

setTimeout("countdown_seconds()",1000)
}
countdown_seconds()