document.write(
'<div class="nav">',
'<div>',
'<p><a href="/bunjo/index.html" target="_top"><img src="/bunjo/images/txt_bunjo.gif" alt="ダイワハウスの分譲住宅・宅地" width="167" height="20" /></a></p>',
'<ul>',
'<li class="nav01"><a href="/bunjo/search_index.html" title="物件を探す" target="_top">物件を探す</a>',
'<ul class="nav01_area">',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1001&mode=00100&disp=2" target="_top">北海道エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1002&mode=00100&disp=2" target="_top">東北エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1003&mode=00100&disp=2" target="_top">関東エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1004&mode=00100&disp=2" target="_top">北陸・信越エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1005&mode=00100&disp=2" target="_top">中部エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1006&mode=00100&disp=2" target="_top">近畿エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1007&mode=00100&disp=2" target="_top">中国エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1008&mode=00100&disp=2" target="_top">四国エリア</a></li>',
'<li><a href="http://www.daiwahouse.co.jp/bunjo/search.html?ads_ken=1009&mode=00100&disp=2" target="_top">九州エリア</a></li>',
'</ul>',
'</li>',
'<li class="nav02"><a href="/bunjo/concept/index.html" title="分譲住宅のコンセプト" target="_top">分譲住宅のコンセプト</a></li>',
'<li class="nav03"><a href="/bunjo/strength/index.html" title="ダイワハウスの強み" target="_top">ダイワハウスの強み</a></li>',
'<li class="nav04"><a href="/bunjo/merit/index.html" title="分譲住宅のメリット" target="_top">分譲住宅のメリット</a></li>',
'<li class="nav05"><a href="/bunjo/after/index.html" title="購入後のサポート" target="_top">購入後のサポート</a></li>',
'<li class="nav06"><a href="https://www3.daiwahouse.co.jp/ie21/research/research.asp" target="_blank" title="土地探しからトータルサポート">土地探しからトータルサポート</a></li>',
'</ul>',
'</div>',
'</div><!-- /.nav -->'
);

document.write('<script type="text/javascript" src="/common/js/ad_insight/status_jutaku.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;
		}
	}
}
