function LimeCGI(ID,NAME,PARENT){
	Lime(ID,NAME);
	Report(PARENT);
	YahooAnalysis();
}

function YahooAnalysis(){
	document.write("<script type=\"text/javascript\" src=\"http://i.yimg.jp/images/analytics/js/ywa.js\"></script>");
	document.write("<script type=\"text/javascript\">");
	document.write("var YWATracker = YWA.getTracker(\"1000106768248\");");
	document.write("YWATracker.addExcludeProtocol(\"file:\");");
	document.write("YWATracker.submit();");
	document.write("</script>");
	document.write("<noscript>");
	document.write("<div><img src=\"http://by.analytics.yahoo.co.jp/p.pl?a=1000106768248&amp;js=no\" width=\"1\" height=\"1\" alt=\"\" /></div>");
	document.write("</noscript>");
}

function Lime(ID,NAME){				// ページカウンタ
	if(ID=="" || NAME=="") return;
	document.write("<IMG SRC=\"http://hpcgi1.nifty.com/eisuke_y/lime_w/lime.cgi?page=");
	document.write(ID);
	document.write("&name=");
	document.write(NAME);
	document.write("\" width=1 height=1>");
}

function Report(PARENT){			// アクセス解析
	document.write("<IMG SRC=\"http://hpcgi1.nifty.com/eisuke_y/report/report.cgi?");
//	if(PARENT=="undefined"){		// フレームなし
		document.write(document.referrer+"\" width=1 height=1>");
//	}
//	else{				// フレームあり
//		document.write(PARENT+"."+document.referrer+"\" width=1 height=1>");
//	}
}

function Cost(name, d, m, y, cost){
	D = nowdate.getTime()-Date.UTC(y, m-1, d, 0, 0, 0);	// 現在までの経過時間(標準時)[ms]
	D -= nowdate.getTimezoneOffset()*60000;				// 時間帯を考慮(60*1000)[ms]
	D = Math.floor(D/86400000);							// 日割り(24*3600*1000)[day]
	document.write(name, "購入日 : ", y, " 年 ", m, " 月 ", d, " 日<BR>")
	document.write(name, "購入費 : ", cost, " 円 (税込)<BR>");
	if(D!=0) cost = Math.round(cost/D);
	document.write(name, "経過日数 : ", D, " 日");
	if(D>365 || D<-365){
		document.write(" (");
		Lapsed(name, d, m, y, "");
		document.write(")");
	}
	document.write("<BR>");
	document.write(name, " 一日当たり : ", cost, " 円 (購入費/経過日数)");
}

function Cost2(name, d, m, y, cost, fd, fm, fy){
	D = Date.UTC(fy, fm-1, fd, 0, 0, 0)-Date.UTC(y, m-1, d, 0, 0, 0);	// 終了までの経過時間(標準時)[ms]
//	D -= nowdate.getTimezoneOffset()*60000;				// 時間帯を考慮(60*1000)[ms]
	D = Math.floor(D/86400000);							// 日割り(24*3600*1000)[day]
	document.write(name, "購入日 : ", y, " 年 ", m, " 月 ", d, " 日<BR>")
	document.write(name, "終了日 : ", fy, " 年 ", fm, " 月 ", fd, " 日<BR>")
	document.write(name, "購入費 : ", cost, " 円 (税込)<BR>");
	if(D!=0) cost = Math.round(cost/D);
	document.write(name, "経過日数 : ", D, " 日");
	if(D>365 || D<-365){
		document.write(" (");
		Lapsed2(name, d, m, y, "", fd, fm, fy);
		document.write(")");
	}
	document.write("<BR>");
	document.write(name, " 一日当たり : ", cost, " 円 (購入費/経過日数)");
}

function Lapsed(name, d, m, y, lang){
	m--;												// 月の補正
	Y = NowYear - y;									// 年数
	Y1 = NowYear;										// Y1に今年を指定
	if(Y>0){
		if(NowMonth<m || (NowMonth==m && NowDate<d)){
			Y--;										// 指定日を過ぎていなければ補正
			Y1--;										// Y1を去年に変更
		}
	}
	D = nowdate.getTime()-Date.UTC(Y1, m, d, 0, 0, 0);	// 一年以内の経過時間(標準時)[ms]
	D -= nowdate.getTimezoneOffset()*60000;				// 時間帯を考慮(60*1000)[ms]
	D = Math.floor(D/86400000);							// 日割り(24*3600*1000)[day]
	if(lang=="English"){								// 英語表記
		document.write(name,":");
		if(Y>1)					document.write(Y, " years");
		else if(Y<-1)			document.write(-Y, " years");
		else if(Y!=0)			document.write("1 year");
		if(Y!=0 && D!=0)		document.write(" and ");
		if(D>1)					document.write(D, " days");
		else if(D<-1)			document.write(-D, " days");
		else if(D!=0)			document.write("1 day");
		else if(Y==0)			document.write("0 day");
	}
	else{												// 日本語表記
		document.write(name);
		if(Y>0)					document.write(Y," 年");
		else if(Y<0)			document.write(-Y," 年");
		if(Y!=0 && D!=0)		document.write(" と ");
		if(D>0)					document.write(D," 日");
		else if(D<0)			document.write(-D," 日");
		else if(Y==0)			document.write("0 日");
	}
}

function Lapsed2(name, d, m, y, lang, fd, fm, fy){
	m--;												// 月の補正
	fm--;												// 月の補正
	Y = fy - y;											// 年数
	Y1 = fy;											// Y1に終了年を指定
	if(Y>0){
		if(fm<m || (fm==m && fd<d)){
			Y--;										// 指定日を過ぎていなければ補正
			Y1--;										// Y1を去年に変更
		}
	}
	D = Date.UTC(fy, fm, fd, 0, 0, 0)-Date.UTC(Y1, m, d, 0, 0, 0);	// 一年以内の経過時間(標準時)[ms]
//	D -= nowdate.getTimezoneOffset()*60000;				// 時間帯を考慮(60*1000)[ms]
	D = Math.floor(D/86400000);							// 日割り(24*3600*1000)[day]
	if(lang=="English"){								// 英語表記
		document.write(name,":");
		if(Y>1)					document.write(Y, " years");
		else if(Y<-1)			document.write(-Y, " years");
		else if(Y!=0)			document.write("1 year");
		if(Y!=0 && D!=0)		document.write(" and ");
		if(D>1)					document.write(D, " days");
		else if(D<-1)			document.write(-D, " days");
		else if(D!=0)			document.write("1 day");
		else if(Y==0)			document.write("0 day");
	}
	else{												// 日本語表記
		document.write(name);
		if(Y>0)					document.write(Y," 年");
		else if(Y<0)			document.write(-Y," 年");
		if(Y!=0 && D!=0)		document.write(" と ");
		if(D>0)					document.write(D," 日");
		else if(D<0)			document.write(-D," 日");
		else if(Y==0)			document.write("0 日");
	}
}

function Today(){
	document.write("Today&nbsp;:&nbsp;",NowDate);
	if (NowDate%10==1 && NowDate !=11)		document.write("st");
	else if (NowDate%10==2 && NowDate !=12)		document.write("nd");
	else if (NowDate%10==3 && NowDate !=13)		document.write("rd");
	else						document.write("th");
	document.write("&nbsp;", EMonth, "&nbsp;", NowYear);
}

function LastUpdate(explanation, Date){
	document.write(explanation);
	if(Date==""){
		document.write(UpMonth,"&nbsp;");
		document.write(UpDate);
		if (UpDate%10==1 && UpDate!=11)		document.write("st");
		else if (UpDate%10==2 && UpDate!=12)	document.write("nd");
		else if (UpDate%10==3 && UpDate!=13)	document.write("rd");
		else					document.write("th");
		document.write(",&nbsp;", UpYear);
	}
	else	document.write(Date);
}

// 現在の日時の定義
nowdate		=	new Date();
NowYear		=	nowdate.getYear();
	if(NowYear<2000){	NowYear += 1900}
NowMonth	=	nowdate.getMonth();
NowDate		=	nowdate.getDate();
NowHour		=	nowdate.getHours();
NowMinute	=	nowdate.getMinutes();

// 月の英語表記
month		=	new Array("January","February","March","April","May","June",
				"July","August","September","October","November","December");
EMonth		=	month[nowdate.getMonth()];

// 更新日時の定義
update		=	new Date(document.lastModified);
UpYear		=	update.getYear();
	if(UpYear<2000){	UpYear += 1900}
UpMonth		=	month[update.getMonth()];
UpDate		=	update.getDate();
UpHour		=	update.getHours();
UpMinute	=	update.getMinutes();
