// 直リンク禁止スクリプト
if( parent.indexvalue != 1 )
{
	// リンク元を取得
	var ref = document.referrer

	if( ref.indexOf( "pub-2809588483253897" ) == -1 )
	{
		// クッキーが使えるか？
		if( navigator.cookieEnabled )
		{
			// 現在のURLを取得
			var nowUrl = location.href;
			// クッキーに保存
			sday = new Date();
			sday.setTime(sday.getTime() + (1 * 1000 * 60 * 60 * 24) );
			s2day = sday.toGMTString();
			document.cookie = "ref=" + ref + ";expires=" + s2day;
			document.cookie = "nowUrl=" + nowUrl + ";expires=" + s2day;
		}

		// インデックスを表示する
		location.href = "index2.html";
	}
}

// ポップアップウィンドウ
function win_open( name_html, win_width, win_height )
{
	// ウィンドウの状態定義
	var state = "toolbar=no, location=no, directories=no, menubar=no, resizable=yes, width=" + win_width + ", height=" + win_height;

	// ウィンドウを開く
	window.open( name_html, "win_open", state );
}
