var yr; var mo; var da;
function setcountdown(theyear,themonth,theday){
	yr=theyear;mo=themonth;da=theday;
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="<b>Sale is Over!</b>"
var message_on_occasion="Sale Over!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='480px'
var countdownheight='20px'
var countdownbgcolor='000000'
var opentags='<table cellpadding="0" cellspacing="0" border="0" width="146"><tr><td  align="center"><font face="Arial" style="font-size:10px;color:336699;">JOURS</font></td><td></td><td  align="center"><font face="Arial" style="font-size:10px;color:336699;">HRS</font></td><td></td><td  align="center"><font face="Arial" style="font-size:10px;color:336699;">MIN</font></td><td></td><td  align="center"><font face="Arial" style="font-size:10px;color:336699;">SEC</font></td></tr><tr  align="center">'
var closetags='</tr></table>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){


	if (document.layers)
		document.countdownnsmain.visibility="show"
	else if (document.all||document.getElementById)
		crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
	countdown()

}


function countdown(){
	var today=new Date()
	var todayy=today.getYear()
	if (todayy < 1000)
	todayy+=1900
	var todaym=today.getMonth()
	var todayd=today.getDate()
	var todayh=today.getHours()
	var todaymin=today.getMinutes()
	var todaysec=today.getSeconds()
	var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
	futurestring=montharray[mo-1]+" "+da+", "+yr
	dd=Date.parse(futurestring)-Date.parse(todaystring)
	dday=Math.floor(dd/(60*60*1000*24)*1)
	dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
	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)
	
	
	
	
			if(dday == 0 && dhour - 21 >= 0){
				crosscount.innerHTML=opentags +"<td  width='20%' class='BoxCL'><b>"+dday+ "</b></td><td>:</td><td class='BoxCL'><b>"+(dhour - 21) +"</b></td><td>:</td><td class='BoxCL'><b>"+dmin+"</b></td><td>:</td><td class='BoxCL'><b>"+dsec+"</b></td>"+closetags
		}
		else if(dday >0)
					{
					if((dhour+3) < 24)
						{			
	crosscount.innerHTML=opentags +"<td  width='20%' class='BoxCL'><b>"+(dday - 1) + "</b></td><td>:</td><td class='BoxCL'><b>"+(dhour+3) +"</b></td><td>:</td><td class='BoxCL'><b>"+dmin+"</b></td><td>:</td><td class='BoxCL'><b>"+dsec+"</b></td>"+closetags
						}
					else
						{
						crosscount.innerHTML=opentags +"<td  width='20%' class='BoxCL'><b>"+(dday) + "</b></td><td>:</td><td class='BoxCL'><b>"+ (dhour-21) +"</b></td><td>:</td><td class='BoxCL'><b>"+dmin+"</b></td><td>:</td><td class='BoxCL'><b>"+dsec+"</b></td>"+closetags
						}
					}
	
	
	setTimeout("countdown()",1000)
}