// クッキー処理開始
cookie_name="kayurukita";
get_data = GetCookie(cookie_name);	//クッキーの読み込み
now = new Date();
year = now.getYear(); if (year < 2000) year = year + 1900;
today	= year
	+ ((now.getMonth() < 9) ? "0" : "") + (now.getMonth()+1)
	+ ((now.getDate() < 10) ? "0" : "") + now.getDate();
today=today.substring(0,4)+"/"+today.substring(4,6)+"/"+today.substring(6,8);
if (get_data == null) {		// 未登録の時、初期値セット
	count  = 1;		//訪問回数
	first  = today;		//初訪問日
	last   = today;		//最終訪問日
	lastp  = "0000/00/00";	//前回最終訪問日
} else {						// クッキーを、項目に分解
	var pairs = new Array(),values = new Array(),str = new Array();
	pairs = get_data.split(",");
	for (i = 0; i < pairs.length; i++) {
		str = pairs[i].split(":");
		values[i] = str[1];
	}
	count  = values[0];
	first  = values[1];
	last   = values[2];
	lastp  = values[3];
	if (last != today) {
		count++;		// カウンター更新
		lastp = last;		// 最終訪問日更新
	}
}
// クッキー処理終了
document.write("あなた様の現在のクッキーの内容<table border bgcolor=bisque><tr><td>");
document.write(document.cookie+"</table>count:<font color=blue>訪問回数</font>、first:");
document.write("<font color=blue>初回訪問日</font>、last:最終訪問日、lastp:前回最終訪問日");
