document.write(
'<div class="nav">',
'<div>',
'<p><a href="http://www.daiwahouse.co.jp/mansion/index.html" target="_top"><img src="/mansion/images/txt_mansion.gif" alt="ダイワハウスの分譲マンション" width="170" height="20" /></a></p>',
'<ul>',
'<li class="nav01"><a href="http://www.daiwahouse.co.jp/mansion/search_index.html" title="物件を探す" target="_top">物件を探す</a>',
'<ul class="nav01_area">',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1001&mode=0001&disp=1" target="_top">北海道エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1002&mode=0001&disp=1" target="_top">東北エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1003&mode=0001&disp=1" target="_top">関東エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1004&mode=0001&disp=1" target="_top">北陸・信越エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1005&mode=0001&disp=1" target="_top">中部エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1006&mode=0001&disp=1" target="_top">近畿エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1007&mode=0001&disp=1" target="_top">中国エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1008&mode=0001&disp=1" target="_top">四国エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/mansion/search.html?ads_ken=1009&mode=0001&disp=1" target="_top">九州エリア</a></li>',
'</ul>',
'</li>',
'<li class="nav02"><a href="http://www.daiwahouse.co.jp/mansion/concept/index.html" title="マンションコンセプト" target="_top">マンションコンセプト</a></li>',
'<li class="nav03"><a href="http://www.daiwahouse.co.jp/mansion/dsbridge/index.html" title="マンション資産価値サポートシステム" target="_top">マンション資産価値サポートシステム</a></li>',
'<li class="nav04"><a href="http://www.daiwahouse.co.jp/mansion/support/index.html" title="購入前後のサポート" target="_top">購入前後のサポート</a></li>',
'<li class="nav05"><a href="http://www.daiwahouse.co.jp/mansion/lifestyle/index.html" title="ライフスタイル情報" target="_top">ライフスタイル情報</a></li>',
'</ul>',
'<p class="btn"><a href="javascript:void(0);" title="友の会ログイン"><span>友の会ログイン</span></a></p>',
'</div>',
'</div><!-- /.nav -->'
);
document.write('<script type="text/javascript" src="/common/js/ad_insight/status_mansion.js" charset="Shift_JIS"></script>');

manCookie();

function manCookie(){
	var urlStr;		//URL文字列
	var cam;
	var med;
	var eve;
	var fre;
	var hpb;
	var re;

	var name_med = "daiwamed";			//Cookieで使用するmed変数名
	var name_cam = "daiwacam";			//Cookieで使用するcam変数名
	var name_eve = "daiwaeve";			//Cookieで使用するeve変数名
	var name_fre = "daiwafre";			//Cookieで使用するfre変数名
	var name_hpb = "daiwahpb";			//Cookieで使用するhpb変数名

	var period = 365;					//有効期限日数
	var period2 = 0.125;					//有効期限日数(hpb用)

	urlStr = location.href;
	re = new RegExp("med=");
	//「med=」が含まれているかチェック
	if (urlStr.match(re)) {
		urlStr = urlStr.substr(re.lastIndex);
		re = new RegExp("&");
		if (urlStr.match(re)) {
			med = urlStr.substr(0,re.lastIndex - 1);
		} else {
			med = urlStr;
		}
	}
	urlStr = location.href;
	re = new RegExp("cam=");
	//「cam=」が含まれているかチェック
	if (urlStr.match(re)) {
		urlStr = urlStr.substr(re.lastIndex);
		re = new RegExp("&");
		if (urlStr.match(re)) {
			cam = urlStr.substr(0,re.lastIndex - 1);
		} else {
			cam = urlStr;
		}
	}
	urlStr = location.href;
	re = new RegExp("eve=");
	//「eve=」が含まれているかチェック
	if (urlStr.match(re)) {
		urlStr = urlStr.substr(re.lastIndex);
		re = new RegExp("&");
		if (urlStr.match(re)) {
			eve = urlStr.substr(0,re.lastIndex - 1);
		} else {
			eve = urlStr;
		}
	}
	urlStr = location.href;
	re = new RegExp("fre=");
	//「fre=」が含まれているかチェック
	if (urlStr.match(re)) {

		urlStr = urlStr.substr(re.lastIndex);
		re = new RegExp("&");
		if (urlStr.match(re)) {
			fre = urlStr.substr(0,re.lastIndex - 1);
		} else {
			fre = urlStr;
		}
	}
	urlStr = location.href;
	re = new RegExp("hpb=");
	//「hpb=」が含まれているかチェック
	if (urlStr.match(re)) {

		urlStr = urlStr.substr(re.lastIndex);
		re = new RegExp("&");
		if (urlStr.match(re)) {
			hpb = urlStr.substr(0,re.lastIndex - 1);
		} else {
			hpb = urlStr;
		}
	}
	if (!isNaN(cam) || !isNaN(med) || !isNaN(eve) || !isNaN(fre) || !isNaN(hpb)) {
		var nowtime = new Date().getTime();
		var clear_time = new Date(nowtime + (60 * 60 * 24 * 1000 * period));
		var expires = clear_time.toGMTString();

		var clear_time2 = new Date(nowtime + (60 * 60 * 24 * 1000 * period2));
		var expires2 = clear_time2.toGMTString();

		if (!isNaN(cam)) {
			document.cookie = name_cam + "=" + escape(cam) + ";path=/;domain=daiwahouse.co.jp;expires=" + expires;
		}
		if(!isNaN(med)) {
			document.cookie = name_med + "=" + escape(med) + ";path=/;domain=daiwahouse.co.jp;expires=" + expires;
		}
		if(!isNaN(eve)) {
			document.cookie = name_eve + "=" + escape(eve) + ";path=/;domain=daiwahouse.co.jp;expires=" + expires;
		}
		if(!isNaN(fre)) {
			document.cookie = name_fre + "=" + escape(fre) + ";path=/;domain=daiwahouse.co.jp;expires=" + expires;
		}
		if(!isNaN(hpb)) {
			document.cookie = name_hpb + "=" + escape(hpb) + ";path=/;domain=daiwahouse.co.jp;expires=" + expires2;
		}
	}
}
