
var minutes = 1000*60;
var hours = minutes*60;
var days = hours*24;
var years = days*365;
var d = new Date();
//var s = new Date(2009,04,9);
var s = new Date(2009,4,9);
var t = d.getTime();
var election = s.getTime();
var y = t/days;
var election_day = election/days;

num = (election_day)-y;
num = Number(num);

day = num.toFixed(0);

day2 = Number(day) + 1;

day = num.toFixed(0);
if(day>=1){
document.write("Election day is in <b>" + day2  + "</b> days<br><a href=\"votingInfo.html\">Find a place to vote.</a>");}
else if(day==0){
document.write("Tomorrow is election day<br><a href=\"votingInfo.html\">Find a place to vote.</a>");}
else if(day==-1){
document.write("Today is election day<br><a href=\"votingInfo.html\">Find a place to vote.</a>");}
else if(day<-1 && day>-30){
document.write("Thank you for your support.");}
else if(day<-30){
document.write("");}

