function countdown(deadline,top,num_left,numSize,txtSize,color)	
		 
{	

	//WIVA
	
	//CALCULATE TIME LEFT
	today=new Date();
	
	deadline=new Date(deadline);
	
	tTime=today.getTime();
	dTime=deadline.getTime();
	
	
	diffTime=Math.floor((dTime-tTime)/(1000*3600*24));
	txt_left=num_left-30;
	
	
	//condition: timeleft is greater than 14 days
	//action: uses 'Weeks Left', adjusts text positions
	if((diffTime>13)){
		//diffTime=Math.floor(diffTime/5) ; 
		 //quant="Weeks Left";diffTime>=10?num_left+=-20:num_left+=0;txt_left+=10; 	
		 document.getElementById("postitjonk").src="images/promo_0204_days.gif";
		 // 	quick and dirty fix for days count. 
							//	change to weeks left and uncomment top line to change back
						
		 
	}
	
	else if((diffTime<=14)&&(diffTime>1))  
	//contion: time left is less than 14 days but more than 1 day
	//action: uses 'Days Left' and adjusts text position
	
	{
		document.getElementById("postitjonk").src="images/promo_0204_days.gif";
		//quant="Days Left";diffTime>=10?num_left+=20:num_left+=0;txt_left+=10;
	}

	else if((diffTime==1))  
	//contion: time left is less than 14 days but more than 1 day
	//action: uses 'Days Left' and adjusts text position
	{
		document.getElementById("postitjonk").src="images/promo_0204_day.gif";
		//quant="Day Left";num_left+=0;txt_left+=13;
	}
	
	
	//condition: last day
	//action: adjusts text position
	if((diffTime<1)&&(diffTime>-1)){
	//diffTime="<div style='line-height: 40px'>Last<br/>Day<br/>&nbsp;</div>";quant="";
	document.getElementById("postitjonk").src="images/promo_0204_lastday.gif";
	numSize-=25; num_left+=-25;txt_left+=13;
	//numSize-=30;top+=10;num_left-=10;lineHeight=2
	}
	
	//condition: past deadline
	//action: load non-promo homepage
	if(diffTime<0){document.getElementById("postitjonk").src="images/1px.gif";
	numSize-=25; num_left+=-25;txt_left+=13;
	}

	
	//GENERATE CONTENT
	
	timeLeft='<div style="color:'+color+';position: absolute; z-index:1000;top: '+top+'px; left:'+num_left+'px; text-align: center; font:bold '+numSize+'px Arial,sans serif">'+diffTime+'</div><div style="position: absolute; z-index: 1000; color:'+color+';top: '+(top+10)+'px; left: 185px;font-weight:bold; font-size:18px;">'+'<br>&nbsp;</div>';
	
	return timeLeft;
	
}

