
/*イベントが上書きされないように追加
懸念事項１：　attachEventは他のブラウザでも使用可能か？
懸念事項２：サブファンクションでのイベントが上書きされていないか。
*/　
if (window.addEventListener) {
window.addEventListener("load", address_find, false);
window.addEventListener("load", genre_find, false);
window.addEventListener("load", sub_genre1, false);
window.addEventListener("load", favorite, false);
window.addEventListener("load", day, false);
window.addEventListener("load", week, false);
window.addEventListener("load", roundCorner, false);
}
if (window.attachEvent) {
window.attachEvent("onload", address_find);
window.attachEvent("onload", genre_find);
window.attachEvent("onload", sub_genre1);
window.attachEvent("onload", favorite);
window.attachEvent("onload", day);
window.attachEvent("onload", week);
window.attachEvent("onload", roundCorner);

}

function genre_find(){
		document.getElementById("like1").onchange = function genresub(){
			var likeNo = this.selectedIndex;
			var likeObj = document.getElementById("sub_like1");
			var subData = [
				[
					{ text : "問わない", value : "0"}
				],
				[//ミュージック
					{ text : "問わない", value : "0"},
					{ text : "Club", value : "1"},
					{ text : "ライブ", value : "2"},
					{ text : "野外", value : "3"}
				],
				[//パーティ・交流
					{ text : "問わない", value : "0"},
					{ text : "交流", value : "4"},
					{ text : "出会い・お見合い", value : "5"},
					{ text : "オフ会", value : "6"}
				],
				[//アート
					{ text : "問わない", value : "0"},
					{ text : "映画", value : "7"},
					{ text : "博物館・美術館", value : "8"},
					{ text : "ギャラリー", value : "9"},
					{ text : "パフォーマンス", value : "10"}
				],
				[//お笑い
					{ text : "問わない", value : "0"},
					{ text : "コント", value : "11"},
					{ text : "漫才", value : "12"},
					{ text : "落語", value : "13"}
				],
				[//活動
					{ text : "問わない", value : "0"},
					{ text : "サイン会", value : "14"},
					{ text : "握手会", value : "15"},
					{ text : "講演", value : "16"},
					{ text : "デモンストレーション", value : "17"},
					{ text : "ボランティア", value : "18"},
					{ text : "習い事", value : "19"},
					{ text : "レクリエーション", value : "20"},
					{ text : "ワークショップ", value : "21"},
					{ text : "ナショナルイベント", value : "22"}
				],
				[//祭り
					{ text : "問わない", value : "0"},
					{ text : "祭り", value : "23"},
					{ text : "花火大会", value : "24"}
				],
				[//スポーツ
					{ text : "問わない", value : "0"},
					{ text : "サッカー", value : "25"},
					{ text : "野球", value : "26"},
					{ text : "バスケ", value : "27"},
					{ text : "ラグビー", value : "28"},
					{ text : "フットサル", value : "29"},
					{ text : "バレー", value : "30"},
					{ text : "スキー", value : "31"},
					{ text : "スノボー", value : "32"},
					{ text : "サーフィン", value : "50"},
					{ text : "ウィンドウサーフィン", value : "33"},
					{ text : "ヨット", value : "34"},
					{ text : "釣り", value : "35"},
					{ text : "空手", value : "36"},
					{ text : "テコンドー", value : "37"},
					{ text : "相撲", value : "38"},
					{ text : "柔道", value : "39"},
					{ text : "総合格闘技", value : "40"},
					{ text : "ボクシング", value : "41"},
					{ text : "K-1", value : "42"}
				],
				[
					{ text : "問わない", value : "0"},
					{ text : "伝統芸能", value : "43"},
					{ text : "ナショナルイベント", value : "44"},
					{ text : "国際交流", value : "45"}
				],
				[
					{ text : "問わない", value : "0"},
					{ text : "ダイニング", value : "46"},
					{ text : "ダイニングバー", value : "47"},
					{ text : "バー", value : "48"},
					{ text : "カフェ", value : "49"}
				]
			];
			while(likeObj.hasChildNodes()){
				likeObj.removeChild(likeObj.firstChild);
			}
			for (var i=0; i<subData[likeNo].length; i++){
				likeObj.options[i] = new Option(subData[likeNo][i].text,
				subData[likeNo][i].value);
			}
		}
	}

		function sub_genre1(){
		document.getElementById("sub_like1").onchange = function genreSubDetail(){
			var likeNo = this.value;
			var likeObj = document.getElementById("sub_like1_detail");
			var subData = [
				[//0
					{ text : "問わない", value : "0"}
				],
				[//1クラブ
					{ text : "問わない", value : "0"},
					{ text : "ヒップホップ", value : "1"},
					{ text : "レゲエ", value : "2"},
					{ text : "R&B", value : "3"},
					{ text : "ロック", value : "4"},
					{ text : "ハウス", value : "5"},
					{ text : "テクノ", value : "6"},
					{ text : "トランス", value : "7"},
					{ text : "エレクトロニカ", value : "8"},
					{ text : "ドラムンベース", value : "9"},
					{ text : "ジャズ", value : "10"},
					{ text : "オールミックス", value : "11"},
					{ text : "ディスコ", value : "12"},
					{ text : "ブレイク", value : "13"},
					{ text : "クラシック", value : "14"},
					{ text : "ブレイクビーツ", value : "15"},
					{ text : "サルサ", value : "16"},
					{ text : "カポエラ", value : "17"},
					{ text : "ベリーダンス", value : "18"},
					{ text : "フラダンス", value : "19"},
					{ text : "スクエアダンス", value : "20"},
					{ text : "ポールダンス", value : "21"},
					{ text : "ダンススポーツ", value : "22"},
					{ text : "ファンク", value : "23"},
					{ text : "エアロビ", value : "24"},
					{ text : "パラパラ", value : "25"},
					{ text : "タヒチアン", value : "26"},
					{ text : "ボールルーム", value : "27"}
				],
				[//2ライブハウス
					{ text : "問わない", value : "0"},
					{ text : "ヒップホップ", value : "1"},
					{ text : "レゲエ", value : "2"},
					{ text : "R&B", value : "3"},
					{ text : "ロック", value : "4"},
					{ text : "ハウス", value : "5"},
					{ text : "テクノ", value : "6"},
					{ text : "トランス", value : "7"},
					{ text : "エレクトロニカ", value : "8"},
					{ text : "ドラムンベース", value : "9"},
					{ text : "ジャズ", value : "10"},
					{ text : "オールミックス", value : "11"},
					{ text : "ディスコ", value : "12"},
					{ text : "ブレイク", value : "13"},
					{ text : "クラシック", value : "14"},
					{ text : "ブレイクビーツ", value : "15"},
					{ text : "サルサ", value : "16"},
					{ text : "カポエラ", value : "17"},
					{ text : "ベリーダンス", value : "18"},
					{ text : "フラダンス", value : "19"},
					{ text : "スクエアダンス", value : "20"},
					{ text : "ポールダンス", value : "21"},
					{ text : "ダンススポーツ", value : "22"},
					{ text : "ファンク", value : "23"},
					{ text : "エアロビ", value : "24"},
					{ text : "パラパラ", value : "25"},
					{ text : "タヒチアン", value : "26"},
					{ text : "ボールルーム", value : "27"}
				],
				[//3野外
					{ text : "問わない", value : "0"},
					{ text : "ヒップホップ", value : "1"},
					{ text : "レゲエ", value : "2"},
					{ text : "R&B", value : "3"},
					{ text : "ロック", value : "4"},
					{ text : "ハウス", value : "5"},
					{ text : "テクノ", value : "6"},
					{ text : "トランス", value : "7"},
					{ text : "エレクトロニカ", value : "8"},
					{ text : "ドラムンベース", value : "9"},
					{ text : "ジャズ", value : "10"},
					{ text : "オールミックス", value : "11"},
					{ text : "ディスコ", value : "12"},
					{ text : "ブレイク", value : "13"},
					{ text : "クラシック", value : "14"},
					{ text : "ブレイクビーツ", value : "15"},
					{ text : "サルサ", value : "16"},
					{ text : "カポエラ", value : "17"},
					{ text : "ベリーダンス", value : "18"},
					{ text : "フラダンス", value : "19"},
					{ text : "スクエアダンス", value : "20"},
					{ text : "ポールダンス", value : "21"},
					{ text : "ダンススポーツ", value : "22"},
					{ text : "ファンク", value : "23"},
					{ text : "エアロビ", value : "24"},
					{ text : "パラパラ", value : "25"},
					{ text : "タヒチアン", value : "26"},
					{ text : "ボールルーム", value : "27"}
				],
				[//4交流会
					{ text : "問わない", value : "0"},
					{ text : "ビジネス", value : "28"}
				],
				[//5出会い
					{ text : "問わない", value : "0"}
				],
				[//6オフ会
					{ text : "問わない", value : "0"}
				],
				[//7映画
					{ text : "問わない", value : "0"},
					{ text : "アクション", value : "29"},
					{ text : "コメディ", value : "30"},
					{ text : "ラブストーリー", value : "31"},
					{ text : "SF", value : "32"},
					{ text : "サスペンス", value : "33"},
					{ text : "スリル", value : "34"},
					{ text : "スペクタル", value : "35"},
					{ text : "スポーツ", value : "36"},
					{ text : "パニック", value : "37"},
					{ text : "ホラー", value : "38"},
					{ text : "ファミリー", value : "39"},
					{ text : "ドキュメンタリー", value : "40"},
					{ text : "アニメ", value : "41"}
				],
				[//8博物館
					{ text : "問わない", value : "0"}
				],
				[//9ギャラリー
					{ text : "問わない", value : "0"},
					{ text : "フォト", value : "42"},
					{ text : "ペイント", value : "43"},
					{ text : "グラフィティ", value : "44"}
				],
				[//10パフォーマンス
					{ text : "問わない", value : "0"},
					{ text : "ミュージカル", value : "45"},
					{ text : "コメディ", value : "46"},
					{ text : "悲劇", value : "47"},
					{ text : "喜劇", value : "48"},
					{ text : "オペラ", value : "49"}
				],
				[//11コント
					{ text : "問わない", value : "0"}
				],
				[//12漫才
					{ text : "問わない", value : "0"}
				],
				[//13落語
					{ text : "問わない", value : "0"}
				],
				[//14サイン会
					{ text : "問わない", value : "0"}
				],
				[//15握手会
					{ text : "問わない", value : "0"}
				],
				[//16講演
					{ text : "問わない", value : "0"}
				],
				[//17デモ
					{ text : "問わない", value : "0"}
				],
				[//18ボランティア
					{ text : "問わない", value : "0"}
				],
				[//19習い事
					{ text : "問わない", value : "0"}
				],
				[//20レクリエーション
					{ text : "問わない", value : "0"}
				],
				[//21ワークショップ
					{ text : "問わない", value : "0"}
				],
				[//22ナショナルイベント
					{ text : "問わない", value : "0"}
				],
				[//23祭り
					{ text : "問わない", value : "0"}
				],
				[//24花火大会
					{ text : "問わない", value : "0"}
				],
				[//25サッカー
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//26野球
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//27バスケ
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//28ラグビー
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//29フットサル
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//30バレー
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//31スキー
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//32スノボー
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//33ウィンドウサーフィン
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//34ヨット
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//35釣り
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//36空手
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//37テコンドー
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//38相撲
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//39柔道
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//40総合格闘技
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//41ボクシング
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//42K1
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//43伝統芸能
				{ text : "問わない", value : "0"},
					{ text : "歌舞伎", value : "53"},
					{ text : "能", value : "54"},
					{ text : "落語", value : "55"}
				],
				[//44ナショナルイベント
					{ text : "問わない", value : "0"}
				],
				[//45国際交流
					{ text : "問わない", value : "0"}
				],
				[//46ダイニング
					{ text : "問わない", value : "0"}
				],
				[//47バー
					{ text : "問わない", value : "0"}
				],
				[//48ダイニングバー
					{ text : "問わない", value : "0"}
				],
				[//49カフェ
					{ text : "問わない", value : "0"}
				],
				[//50サーフィン
					{ text : "問わない", value : "0"},
					{ text : "観戦", value : "50"},
					{ text : "メンバー募集", value : "51"},
					{ text : "参加チーム募集", value : "52"}
				],
				[//51メイク・ヘアー
					{ text : "問わない", value : "0"},
					{ text : "コンテスト", value : "56"},
					{ text : "モデル募集", value : "57"}
				],
				[//52ファッションデザイン
					{ text : "問わない", value : "0"},
					{ text : "コンテスト", value : "56"},
					{ text : "モデル募集", value : "57"}
				],
				[//53環境
					{ text : "問わない", value : "0"}
				],
				[//54その他
					{ text : "問わない", value : "0"}
				]
			];
			while(likeObj.hasChildNodes()){
				likeObj.removeChild(likeObj.firstChild);
			}
			for (var i=0; i<subData[likeNo].length; i++){
				likeObj.options[i] = new Option(subData[likeNo][i].text,
				subData[likeNo][i].value);
			}
		}
	}
	