// JavaScript Document

/*
Count down until any date script-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/

//change the text below to reflect your own,
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countdown(yr,m,d,txt,col){
	var today=new Date()
	var todayy=today.getYear()
	var plural="s"
	if (todayy < 1000) {
	todayy+=1900
	}
	var todaym=today.getMonth()
	var todayd=today.getDate()
	var todaystring=montharray[todaym]+" "+todayd+", "+todayy
	var futurestring=montharray[m-1]+" "+d+", "+yr
	var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
	if (difference>=0) {
			document.write('<p style="color:#' +col+ '">')	
			if (difference==1) {
				var plural=""
			}
		if (difference==0) {
			document.write('The '+txt+ ' is&nbsp;today!')
		}
		else if (difference>0) {
			document.write(difference+' day'+plural+' to the<br />'+txt)
			document.write('<br /><span style="font-weight:100; color:#888">'+futurestring+'</span>')
			}
			document.write('</p>')	
		}
	}
//enter the count down date using the format year/month/day
