//地域ボックスの表示・非表示
function hide(lnm){
	if(document.getElementById){
		if (document.getElementById("Temperature") != null) {
			document.getElementById("Temperature").style.visibility = "visible";
			document.getElementById("Figure").style.visibility = "visible";
			document.getElementById("Rain").style.visibility = "visible";
			document.getElementById("LiveprobPrecip").style.visibility = "visible";

			document.getElementById("Temperature2").style.visibility = "visible";
			document.getElementById("Figure2").style.visibility = "visible";
			document.getElementById("Rain2").style.visibility = "visible";
			document.getElementById("GotoprobPrecip").style.visibility = "visible";
		}

		document.getElementById(lnm).style.visibility="hidden";
	}
	if(document.layers){
		document.layers[lnm].visibility="hide"
	}	
};
function show(lnm){
if(document.getElementById){

	if (document.getElementById("Temperature") != null) {
		document.getElementById("Temperature").style.visibility = "hidden";
		document.getElementById("Figure").style.visibility = "hidden";
		document.getElementById("Rain").style.visibility = "hidden";
		document.getElementById("LiveprobPrecip").style.visibility = "hidden";

		document.getElementById("Temperature2").style.visibility = "hidden";
		document.getElementById("Figure2").style.visibility = "hidden";
		document.getElementById("Rain2").style.visibility = "hidden";
		document.getElementById("GotoprobPrecip").style.visibility = "hidden";
	}

	document.getElementById(lnm).style.visibility="visible";
}
if(document.layers)document.layers[lnm].visibility="show";
};

//サイトカタリスト
function wSCClick(LinkName){
	var s=s_gi(s_account);
	s.linkTrackVars='prop7,eVar7,prop13,prop14';
	s.prop7		= LinkName;
	s.eVar7		= LinkName;
	s.prop13	= SiteCatalystCookie0;
	s.prop14	= SiteCatalystDateTimeSec;
	s.tl(this,'o',LinkName);
}

//Cookieの読み込み
function readUFCookie() {

	var strs_obj = new Object();
	var hen = new Object();

	if (document.cookie != '') {

		//Cookie読み込んで
		var s_cookie = document.cookie.split(';');

		//機能ごとに分解して配列化して
		for (i = 0; s_cookie.length > i; i++) {
			//スペースの削除
			var hd_strs = s_cookie[i].replace(' ', '');
			//=で分割
			var strs = hd_strs.split('=');
			strs_obj[strs[0]] = unescape(strs[1]);
		}

		if ((strs_obj["wa"] != '') && (typeof strs_obj["wa"] != 'undefined')) {

			//strs_obj[wa]をさらに分解して
			var values = strs_obj["wa"].split(';');

			//変数ごとに分解して配列化してデコード
			for (i = 0; values.length > i; i++) {
				var strs_m = values[i].split('=');
				hen[strs_m[0]] = unescape(strs_m[1]);
			}

		} else {

			hen["i"] = '';
			hen["l"] = '';
			hen["wg"] = '';
			hen["wl"] = '';

		}

	} else {

		hen["i"] = '';
		hen["l"] = '';
		hen["wg"] = '';
		hen["wl"] = '';

	}

	//ここで判定。
	return hen;

}


//Cookieの作成
function writeUFCookie(name, value, expdays) {

	var strs_obj = new Object();

	//Cookieの読み込み
	var hen = readUFCookie();

	//上書き対象の変数を上書きして
	hen[name] = value;

	//alert("i=" + hen['i']);
	//alert("l=" + hen['l']);
	//alert("wg=" + hen['wg']);
	//alert("wl=" + hen['wl']);

	//お住まいが99、かつ「選択しない」チェックがはずれている場合、お住まいを削除する。
	if ((hen['wl'] == WNotSel) && (!document.getElementById('wlLivenotSel').checked)) {
		hen['wl'] = '';
	}

	//よく行くが99、かつ「選択しない」チェックがはずれている場合、よく行くを削除する。
	if ((hen['wg'] == WNotSel) && (!document.getElementById('wlGotonotSel').checked)) {
		hen['wg'] = '';
	}

	//値が存在する変数のみ合体して
	var compStrs = '';
	for (key in hen) {
		if ((key != '') && (hen[key] != '') && (typeof hen[key] != 'undefined')) {
			compStrs += key + '=' + hen[key] + ';';
		}
	}

	//最後の「;」を削る
	var s_compStrs = compStrs.substr(0,compStrs.length - 1);

	//エンコード
	var enc_compStrs = escape(s_compStrs);

	//↓（Cookie書き込み
	t = new Date;
	t.setTime(t.getTime() + expdays * 24 * 60 * 60 * 1000);
	document.cookie = 'wa=' + enc_compStrs + '; path=/; expires=' + t.toGMTString();

}

//選択しないの値設定
var WNotSel = '99';
var WNotSelArea = 13; //おすすめ、えきネットは東京で固定

//選択しないを選択した場合
function wlCheckSel(value) {

	if (value == 'Live') {
		//お住まい
		if (document.getElementById('wlLivenotSel').checked) {
			changeLiveWeather(WNotSel);
		} else {

			//Cookie書き込み
			writeUFCookie("wl", WNotSel, 3650);

			if ((w_Area_live_default != '0') && (w_Area_live_default != '') && (typeof w_Area_live_default != 'undefined')) {
				LOADchangeLiveWeather(w_Area_live_default);
			} else {
				//本当になにもない場合は「東京」
				LOADchangeLiveWeather(WNotSelArea);
			}
		}
	} else {
		//よく行く
		if (document.getElementById('wlGotonotSel').checked) {
			changeGotoWeather(WNotSel);
		} else {

			//Cookie書き込み
			writeUFCookie("wg", WNotSel, 3650);

			if ((typeof w_Area_gowell_default != 'undefined') && (w_Area_gowell_default != '0') && (w_Area_gowell_default != '')) {
				LOADchangeGotoWeather(w_Area_gowell_default);
			} else {
				//本当になにもない場合は「NULL（-表示）」
				LOADchangeGotoWeather('');
			}
		}
	}

}

//お住まいの地域
function changeLiveWeather(code) {

	//地域設定
	LOADchangeLiveWeather(code);
	
	if ((code != '0') && (code != '') && (typeof code != 'undefined')) {

		//Cookie書き込み
		writeUFCookie("wl", code, 3650);

		//サイトカタリスト
		//デフォルト値の設定読み込み
		var hen = readUFCookie();
		//ログイン状態の読み込み
		var isLogin = document.cookie.match(/personal\=.{80,}/i);
		wSCClick('TOPA_' + code + '_' + hen['l'] + '_' + isLogin);

	}

}

//お住まいの地域(画面ロード時は直接こいつを読む)
function LOADchangeLiveWeather(code) {

	if ((code != WNotSel) && (code != '') && (typeof code != 'undefined')) {

		//ヘッダタイトルリンク作成（）
		if ((w_Area_info[code].pref != '') && (typeof w_Area_info[code].pref != 'undefined')) {
			document.getElementById('LiveareaLink').innerHTML = makeTitleLink(code, w_Area_info[code].pref, 'The weather at home<br>');
		} else {
			document.getElementById('LiveareaLink').innerHTML = makeTitleLink(code, 'unestablished', 'The weather at home<br>');
		}

		//画像ポップアップリンク
		if ((w_Area_list[code].cd != '') && (typeof w_Area_list[code].cd != 'undefined')) {
			document.getElementById('LiveweatherImage').innerHTML = makeImageLink(code, w_Area_list[code].cd);
		} else {
			document.getElementById('LiveweatherImage').innerHTML = '';
		}

		//最高気温
		if ((w_Area_list[code].hi != '') && (typeof w_Area_list[code].hi != 'undefined')) {
			document.getElementById('LivehighTemp').innerHTML = w_Area_list[code].hi;
		} else {
			document.getElementById('LivehighTemp').innerHTML = '--';
		}

		//降水確率
		if ((w_Area_list[code].per != '') && (typeof w_Area_list[code].per != 'undefined')) {
			document.getElementById('LiveprobPrecip').innerHTML = w_Area_list[code].per + "%";
		} else {
			document.getElementById('LiveprobPrecip').innerHTML = '--%';
		}

	} else {

		document.getElementById('LiveareaLink').innerHTML = '<strong>The weather at home<br>(unestablished)</strong>';
		document.getElementById('LiveweatherImage').innerHTML = '';
		document.getElementById('LivehighTemp').innerHTML = '--';
		document.getElementById('LiveprobPrecip').innerHTML = '--%';

	}

	// 一覧表示の切り替え
	displayList("Live", code);

}

//よく行く地域
function changeGotoWeather(code) {

	//地域設定
	LOADchangeGotoWeather(code);

	//if ((code != '0') && (code != '') && (typeof code != 'undefined')) {
	if (typeof code != 'undefined') {

		//Cookie書き込み
		writeUFCookie("wg", code, 3650);

	}

}

//よく行く地域(画面ロード時は直接こいつを読む)
function LOADchangeGotoWeather(code) {

	if ((code != WNotSel) && (code != '0') && (code != '') && (typeof code != 'undefined')) {

		if ((w_Area_info[code].pref != '') && (typeof w_Area_info[code].pref != 'undefined')) {
			document.getElementById('GotoareaLink').innerHTML = makeTitleLink(code, w_Area_info[code].pref, 'The weather at your destination<br>');
		} else {
			document.getElementById('GotoareaLink').innerHTML = makeTitleLink(code, 'unestablished', 'The weather at your destination<br>');
		}

		//画像ポップアップリンク
		if ((w_Area_list[code].cd != '') && (typeof w_Area_list[code].cd != 'undefined')) {
			document.getElementById('GotoweatherImage').innerHTML = makeImageLink(code, w_Area_list[code].cd);
		} else {
			document.getElementById('GotoweatherImage').innerHTML = '';
		}

		//最高気温
		if ((w_Area_list[code].hi != '') && (typeof w_Area_list[code].hi != 'undefined')) {
			document.getElementById('GotohighTemp').innerHTML = w_Area_list[code].hi;
		} else {
			document.getElementById('GotohighTemp').innerHTML = '--';
		}

		//降水確率
		if ((w_Area_list[code].per != '') && (typeof w_Area_list[code].per != 'undefined')) {
			document.getElementById('GotoprobPrecip').innerHTML = w_Area_list[code].per + '%';
		} else {
			document.getElementById('GotoprobPrecip').innerHTML = '--%';
		}

	} else {

		document.getElementById('GotoareaLink').innerHTML = '<strong>The weather at your destination<br>(<span>unestablished</span>)</strong>';
		document.getElementById('GotoweatherImage').innerHTML = '';
		document.getElementById('GotohighTemp').innerHTML = '--';
		document.getElementById('GotoprobPrecip').innerHTML = '--%';

	}

	// 一覧表示の切り替え
	displayList("Goto", code);

}

// 一覧表示の切り替え
function displayList(mode, code) {

	if (mode == 'Goto') {
		//よく行く
		if (code == WNotSel) {
			//選択しないチェックをつける（一覧非表示）
			if (document.getElementById('wlGotonotSel') != null) {
				document.getElementById('wlGotonotSel').checked = true;
			}
			var Gotolist_str = '';

			Gotolist_str = '<p><img src="/eng/toppage/image/weather/swap_e_img_081203.gif" alt="" width="477" height="206"></p>';

			if (document.getElementById('Gotolist') != null) {
				document.getElementById('Gotolist').innerHTML = Gotolist_str;
			}
		} else {
			//選択しないチェックをはずす（一覧表示）
			if (document.getElementById('wlGotonotSel') != null) {
				document.getElementById('wlGotonotSel').checked = false;
			}
			var Gotolist_str = '';
			Gotolist_str = '<div class="choice gMedium">';
			Gotolist_str += '<p>Please set an area.</p>';
			Gotolist_str += '</div>';
			Gotolist_str += '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="fntMedium" summary=" ">';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Hokkaido</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(48)" class="weatherArrow" title="Do-hoku">Do-hoku</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(1)" class="weatherArrow" title="Do-ou">Do-ou</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(49)" class="weatherArrow" title="Do-tou">Do-tou</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(50)" class="weatherArrow" title="Do-nan">Do-nan</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Tohoku</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(2)" class="weatherArrow" title="Aomori">Aomori</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(3)" class="weatherArrow" title="Iwate">Iwate</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(4)" class="weatherArrow" title="Miyagi">Miyagi</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(5)" class="weatherArrow" title="Akita">Akita</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(6)" class="weatherArrow" title="Yamagata">Yamagata</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(7)" class="weatherArrow" title="Fukushima">Fukushima</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Kanto</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(13)" class="weatherArrow" title="Tokyo">Tokyo</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(14)" class="weatherArrow" title="Kanagawa">Kanagawa</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(11)" class="weatherArrow" title="Saitama">Saitama</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(12)" class="weatherArrow" title="Chiba">Chiba</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(8)" class="weatherArrow" title="Ibaraki">Ibaraki</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(9)" class="weatherArrow" title="Tochigi">Tochigi</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(10)" class="weatherArrow" title="Gunma">Gunma</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Koshinetsu / Hokuriku</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(20)" class="weatherArrow" title="Nagano">Nagano</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(19)" class="weatherArrow" title="Yamanashi">Yamanashi</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(15)" class="weatherArrow" title="Niigata">Niigata</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(16)" class="weatherArrow" title="Toyama">Toyama</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(17)" class="weatherArrow" title="Ishikawa">Ishikawa</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(18)" class="weatherArrow" title="Fukui">Fukui</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Tokai</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(22)" class="weatherArrow" title="Shizuoka">Shizuoka</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(23)" class="weatherArrow" title="Aichi">Aichi</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(21)" class="weatherArrow" title="Gifu">Gifu</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(24)" class="weatherArrow" title="Mie">Mie</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Kinki</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(25)" class="weatherArrow" title="Shiga">Shiga</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(26)" class="weatherArrow" title="Kyoto">Kyoto</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(27)" class="weatherArrow" title="Osaka">Osaka</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(28)" class="weatherArrow" title="Hyogo">Hyogo</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(29)" class="weatherArrow" title="Nara">Nara</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(30)" class="weatherArrow" title="Wakayama">Wakayama</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Shikoku / Chugoku</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(33)" class="weatherArrow" title="Okayama">Okayama</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(34)" class="weatherArrow" title="Hiroshima">Hiroshima</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(32)" class="weatherArrow" title="Shimane">Shimane</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(31)" class="weatherArrow" title="Tottori">Tottori</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(35)" class="weatherArrow" title="Yamaguchi">Yamaguchi</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(36)" class="weatherArrow" title="Tokushima">Tokushima</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(37)" class="weatherArrow" title="Kagawa">Kagawa</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(38)" class="weatherArrow" title="Ehime">Ehime</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(39)" class="weatherArrow" title="Kochi">Kochi</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '<tr>';
			Gotolist_str += '<th>Kyushu / Okinawa</th>';
			Gotolist_str += '<td><a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(40)" class="weatherArrow" title="Fukuoka">Fukuoka</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(44)" class="weatherArrow" title="Oita">Oita</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(42)" class="weatherArrow" title="Nagasaki">Nagasaki</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(41)" class="weatherArrow" title="Saga">Saga</a> <br>';
			Gotolist_str += '<a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(43)" class="weatherArrow" title="Kumamoto">Kumamoto</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(45)" class="weatherArrow" title="Miyazaki">Miyazaki</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(46)" class="weatherArrow" title="Kagoshima">Kagoshima</a> <a href="javascript:hide(LThree);hide(LTwo);changeGotoWeather(47)" class="weatherArrow" title="Okinawa">Okinawa</a></td>';
			Gotolist_str += '</tr>';
			Gotolist_str += '</table>';

			if (document.getElementById('Gotolist') != null) {
				document.getElementById('Gotolist').innerHTML = Gotolist_str;
			}
		}
	} else {
		//お住まい
		if (code == WNotSel) {
			//選択しないチェックをつける（一覧非表示）
			if (document.getElementById('wlLivenotSel') != null) {
				document.getElementById('wlLivenotSel').checked = true;
			}
			var Livelist_str = '';

			Livelist_str = '<p><img src="/eng/toppage/image/weather/swap_e_img_081203.gif" alt="" width="477" height="206"></p>';

			if (document.getElementById('Livelist') != null) {
				document.getElementById('Livelist').innerHTML = Livelist_str;
			}
		} else {
			//選択しないチェックをはずす（一覧表示）
			if (document.getElementById('wlLivenotSel') != null) {
				document.getElementById('wlLivenotSel').checked = false;
			}
			var Livelist_str = '';
			Livelist_str = '<table border="0" cellpadding="0" cellspacing="0" class="fntMedium" summary=" ">';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Hokkaido</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(48)" class="weatherArrow" title="Do-hoku">Do-hoku</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(1)" class="weatherArrow" title="Do-ou">Do-ou</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(49)" class="weatherArrow" title="Do-tou">Do-tou</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(50)" class="weatherArrow" title="Do-nan">Do-nan</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Tohoku</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(2)" class="weatherArrow" title="Aomori">Aomori</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(3)" class="weatherArrow" title="Iwate">Iwate</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(4)" class="weatherArrow" title="Miyagi">Miyagi</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(5)" class="weatherArrow" title="Akita">Akita</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(6)" class="weatherArrow" title="Yamagata">Yamagata</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(7)" class="weatherArrow" title="Fukushima">Fukushima</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Kanto</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(13)" class="weatherArrow" title="Tokyo">Tokyo</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(14)" class="weatherArrow" title="Kanagawa">Kanagawa</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(11)" class="weatherArrow" title="Saitama">Saitama</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(12)" class="weatherArrow" title="Chiba">Chiba</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(8)" class="weatherArrow" title="Ibaraki">Ibaraki</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(9)" class="weatherArrow" title="Tochigi">Tochigi</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(10)" class="weatherArrow" title="Gunma">Gunma</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Koshinetsu / Hokuriku</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(20)" class="weatherArrow" title="Nagano">Nagano</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(19)" class="weatherArrow" title="Yamanashi">Yamanashi</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(15)" class="weatherArrow" title="Niigata">Niigata</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(16)" class="weatherArrow" title="Toyama">Toyama</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(17)" class="weatherArrow" title="Ishikawa">Ishikawa</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(18)" class="weatherArrow" title="Fukui">Fukui</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Tokai</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(22)" class="weatherArrow" title="Shizuoka">Shizuoka</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(23)" class="weatherArrow" title="Aichi">Aichi</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(21)" class="weatherArrow" title="Gifu">Gifu</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(24)" class="weatherArrow" title="Mie">Mie</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Kinki</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(25)" class="weatherArrow" title="Shiga">Shiga</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(26)" class="weatherArrow" title="Kyoto">Kyoto</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(27)" class="weatherArrow" title="Osaka">Osaka</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(28)" class="weatherArrow" title="Hyogo">Hyogo</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(29)" class="weatherArrow" title="Nara">Nara</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(30)" class="weatherArrow" title="Wakayama">Wakayama</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Shikoku / Chugoku</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(33)" class="weatherArrow" title="Okayama">Okayama</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(34)" class="weatherArrow" title="Hiroshima">Hiroshima</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(32)" class="weatherArrow" title="Shimane">Shimane</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(31)" class="weatherArrow" title="Tottori">Tottori</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(35)" class="weatherArrow" title="Yamaguchi">Yamaguchi</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(36)" class="weatherArrow" title="Tokushima">Tokushima</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(37)" class="weatherArrow" title="Kagawa">Kagawa</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(38)" class="weatherArrow" title="Ehime">Ehime</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(39)" class="weatherArrow" title="Kochi">Kochi</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '<tr>';
			Livelist_str += '<th>Kyushu / Okinawa</th>';
			Livelist_str += '<td><a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(40)" class="weatherArrow" title="Fukuoka">Fukuoka</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(44)" class="weatherArrow" title="Oita">Oita</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(42)" class="weatherArrow" title="Nagasaki">Nagasaki</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(41)" class="weatherArrow" title="Saga">Saga</a> <br>';
			Livelist_str += '<a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(43)" class="weatherArrow" title="Kumamoto">Kumamoto</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(45)" class="weatherArrow" title="Miyazaki">Miyazaki</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(46)" class="weatherArrow" title="Kagoshima">Kagoshima</a> <a href="javascript:hide(LZero);hide(LOne);changeLiveWeather(47)" class="weatherArrow" title="Okinawa">Okinawa</a></td>';
			Livelist_str += '</tr>';
			Livelist_str += '</table>';

			if (document.getElementById('Livelist') != null) {
				document.getElementById('Livelist').innerHTML = Livelist_str;
			}
		}
	}

}

function loadWeather() {

//alert(document.cookie);

	//デフォルト値の設定読み込み
	var hen = readUFCookie();

	//ログイン状態の読み込み
	var isLogin = document.cookie.match(/personal\=.{80,}/i);

	//デフォルト値の変更（天気）
	//お住まい
	if ((hen["wl"] != '0') && (hen["wl"] != '') && (typeof hen["wl"] != 'undefined')) {
		LOADchangeLiveWeather(hen["wl"]);
		//alert('おすまい：' + hen["wl"]);
	} else {
		if ((w_Area_live_default != '0') && (w_Area_live_default != '') && (typeof w_Area_live_default != 'undefined')) {
			LOADchangeLiveWeather(w_Area_live_default);
		} else {
			//本当になにもない場合は「東京」
			LOADchangeLiveWeather(WNotSelArea);
		}
	}
	//よく行く
	if ((hen["wg"] != '0') && (hen["wg"] != '') && (typeof hen["wg"] != 'undefined')) {
		LOADchangeGotoWeather(hen["wg"]);
	} else {
		if ((typeof w_Area_gowell_default != 'undefined') && (w_Area_gowell_default != '0') && (w_Area_gowell_default != '')) {
			LOADchangeGotoWeather(w_Area_gowell_default);
		} else {
			//本当になにもない場合は「NULL（-表示）」
			LOADchangeGotoWeather('');
		}
	}

	return hen;

}
