// Author: Patrick Fairfield
// Fairfield Consulting
// change your event date event here.

var eventdate = new Date("October 22, 2012 14:00:00");
var eventlocaldate = new Date("October 22, 2012 09:00:00");
var current = new Date("May 18, 2009 09:00:00");
var gmtHours = current.getTimezoneOffset()/60;



function toSt(n)
{s=""
if(n<10) s+="0"
return s+n.toString();
}

function countdown()
{cl=document.clock;
d=new Date();
count=Math.floor((eventdate.getTime()-d.getTime())/1000);
if(count<=0)
{cl.days.value ="----";
cl.hours.value="--";
cl.mins.value="--";
cl.secs.value="--";
return;
}
cl.secs.value=toSt(count%60);
count=Math.floor(count/60);
cl.mins.value=toSt(count%60);
count=Math.floor(count/60);
cl.hours.value=toSt(count%24);
count=Math.floor(count/24);
cl.days.value=count; 

setTimeout("countdown()",500);
}

