(function(){
	var topicsDateList = new Array();
	var topicsDate = new Array();
	
	var ele1 = document.getElementById('topics');
	topicsDateList = ele1.getElementsByTagName('th');
	
	for(var n1=0 ; n1<topicsDateList.length ; n1++ ){
	
		topicsDate[n1] = topicsDateList[n1].getElementsByTagName('p')[0].innerHTML;
		var topicsDateYear = topicsDate[n1].split('.')[0];
		var topicsDateMonth = topicsDate[n1].split('.')[1];
		var topicsDateDay = topicsDate[n1].split('.')[2];
		
		topicsDateMonth = topicsDateMonth - 0 - 1;  //数値型へ、1コ引く
		if((topicsDateMonth>=0)&&(topicsDateMonth<=9)) topicsDateMonth = '0' + topicsDateMonth;
		//1月→00　10月→09　11月→10　12月→11
		
		if(topicsDateDay.length==1) topicsDateDay = '0' + topicsDateDay;
		
		var Day = 24 * 60 * 60 * 1000;  //1日のミリ秒
		var Today = new Date();
		var Past = new Date(topicsDateYear,topicsDateMonth,topicsDateDay,00,00,00);
		var Diff = Today.getTime() - Past.getTime();
		
		if(Diff<15*Day){  //●日以内ならNEW表示
			with(topicsDateList[n1].getElementsByTagName('p')[0].style){
				backgroundImage = 'url(./images/new.gif)';
				backgroundPosition = 'left 2px';
				backgroundRepeat = 'no-repeat';
			}
		}
	}
})();

