function search_focus()
{
	var obj = document.top_search_box.q;
	if(obj) obj.className = 'q_back_off';
}

function search_blur()
{
	if (document.top_search_box.q.value=='') {
		var obj = document.top_search_box.q;
		if(obj) obj.className = 'q_back_on';
	}
}

function prefectures_select(t)
{
	prefectures=t.options[t.selectedIndex].value;

	var url = '/member.php?prefectures='+encodeURIComponent(prefectures);
	httpObj = createXMLHttpRequest(prefecturesResult);
	if (httpObj) {
		httpObj.open("GET", url, true);
		httpObj.send(null);
	}
}

function prefecturesResult()
{
	if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
		var t = document.member_form.elements['district'];
		t.length = 0;

		var district_list = httpObj.responseText.split(",");
		for (i=0; i<district_list.length; i++) {
			addSelOption( t, district_list[i]);
		}
	}
}

function addSelOption( selObj, myValue )
{
	selObj.length++;
	selObj.options[selObj.length-1].value=myValue;
	selObj.options[selObj.length-1].text =myValue;
}


function submit_check(){

	if(window.confirm('送信してよろしいですか？')){ // 確認ダイアログを表示

		return true; // 「OK」時は送信を実行

	}
	else{ // 「キャンセル」時の処理

		window.alert('キャンセルされました'); // 警告ダイアログを表示
		return false; // 送信を中止

	}

}