// 外部からの直リンだったらルートにリダイレクトしてから子ページを再ロード
function CheckReferrer() {
	var test_dir = "/";	// テスト時："/test/"　運用時："/"
	var pathname = location.pathname.replace(test_dir,"");
	var flg = document.referrer.indexOf("miecat.com");

	if (flg < 1 && location.protocol == "http:") {
		top.location.href = "http://miecat.com"+test_dir+"?"+pathname;
	}
}

// 更新日時を取得してupdateに出力する
function GetUpdate() {
	a = new Date(document.lastModified);
	y = a.getYear();
	m = a.getMonth()+1;
	d = a.getDate();
	if (y < 2000) { y += 1900; }
	if (y < 1950) { y += 100; }
	if (m < 10)   { m = "0"+m; }
	if (d < 10)   { d = "0"+d; }
	var obj = parent.document.getElementById("update");
	obj.innerText = y+"."+m+"."+d;
}
