/* ------------------------------------------------------------------------------------------------------------------ */
/* 表示件数変更                                                                                                       */
/* ------------------------------------------------------------------------------------------------------------------ */
function disp_count_option_change_submit (id) {
	var f1 = document.getElementById( 'searchform' );
	var f2 = document.getElementById( id           );
	if (f1 && f2) {
		var inum = f2.inum.options[f2.inum.selectedIndex].value;
		f1.inum.value = inum;
		f1.submit();
	}
	return false ;
}
/* ------------------------------------------------------------------------------------------------------------------ */



/* ------------------------------------------------------------------------------------------------------------------ */
/* 表示切替 : もっとみる <---> 閉じる                                                                                 */
/* ------------------------------------------------------------------------------------------------------------------ */
function display_change (block_id,open_btn_id) {

	var obj_block = document.getElementById( block_id     );
	var obj_btn   = document.getElementById( open_btn_id  );

	if (obj_block && obj_btn) {
		var display_status = obj_block.style.display;
		if (display_status == 'none') {
			obj_block.style.display = 'block';
			obj_btn.style.display   = 'none';
		} else {
			obj_block.style.display = 'none';
			obj_btn.style.display   = 'block';
		}
	}
}
/* ------------------------------------------------------------------------------------------------------------------ */



/* ------------------------------------------------------------------------------------------------------------------ */
/* ヘッダ部検索フォームサブミット                                                                                     */
/* ------------------------------------------------------------------------------------------------------------------ */
function onsubmit_searchform ( f ) {
	if (f.sub_category_id) {
		if (f.sub_category_id.value != '') {
			var len = f.category.length;
			f.category.options[len] = new Option( '' , f.sub_category_id.value );
			f.category.options[len].selected = true;
		}
	}
	f.submit();
}
/* ------------------------------------------------------------------------------------------------------------------ */


/* ------------------------------------------------------------------------------------------------------------------ */
/* 価格帯フィルター部分 サブミット                                                                                    */
/* ------------------------------------------------------------------------------------------------------------------ */
function price_option_change_submit (id) {
	var f1 = document.getElementById('searchform');
	var f2 = document.getElementById(id);
	if (f1 && f2) {
		f1.pricel.value = f2.pricel.value;
		f1.pricem.value = f2.pricem.value;
		onsubmit_searchform( f1 );
	}
	return false ;
}
/* ------------------------------------------------------------------------------------------------------------------ */


/* ------------------------------------------------------------------------------------------------------------------ */
/* レビューに絵文字アイコンを追加する
/* ------------------------------------------------------------------------------------------------------------------ */
function add_image_icon_to_review (icon_id,icon_title) {
	var review = document.getElementById('review_text');
	if (review) {
		review.value += " [絵文字:"+icon_id+"] "+ icon_title + ' ';
	}
}
/* ------------------------------------------------------------------------------------------------------------------ */

