function fnc_showImage(){

	var forDate;
	var forYear;
	var forMonth;
	var forDay;

    var objDate = new Date();
	var nowDate;
    var nowYear;
    var nowMonth;
    var nowDay;

	// 現在の日付取得
	nowYear  = objDate.getYear();
	nowMonth = objDate.getMonth();
	nowDay   = objDate.getDate();
	
    if(nowYear < 2000){
        nowYear+=1900;
	}

    if(nowMonth == 12){
        nowMonth=1;
    }else{
        nowMonth++;
	}

	// 日付データを整形（ exp.20021210 )
	nowDate = fnc_formatDate(nowYear,nowMonth,nowDay);

	// imagesコレクションの全ての要素を対象とする
	for(var cnt=0;cnt<document.images.length;cnt++){

		// src属性が none.gifであれば
		if(document.images[cnt].src.indexOf("/none.gif")!=-1){

			// name属性の表示終了日を取得
			forDate = document.images[cnt].name.split("/");

			// 表示画像を取得
			dispimg = forDate[3];

			// 日付データを整形（ exp.20021210 )
			forDate = fnc_formatDate(forDate[0],forDate[1],forDate[2]);

			// 期間内であれば更新画像を設定
			if(forDate>=nowDate){
				if(dispimg == "new"){
					document.images[cnt].src="/src/img/ico_new.gif"; // Newの画像を設定
				}else if(dispimg == "up"){
					document.images[cnt].src="/src/img/ico_updated.gif";  // UPの画像を設定
				}else{
					document.images[cnt].src="/src/img/none.gif";    // New,UP以外が設定されていた場合に表示する画像を設定(とりあえずnone)
				}
			}

		}

	}

}

// 日付データ整形処理
function fnc_formatDate(strYear,strMonth,strDay){

	var result = "";

	result = strYear;
	result += ("0"+strMonth).substr(("0"+strMonth).length-2,2);
	result += ("0"+strDay).substr(("0"+strDay).length-2,2);

	return result;

}

window.onload = fnc_showImage


//★指定画像は img/none.gif name属性は name="2005/01/05と書いてください。 2005/02/03
