<!--

function mainSearch(fm){
	path = fm.action;
	path += '?pref_id=' + fm.pref_id.value;
	if(detail == 1){
		if(fm.category_id.value != "") path += '&category_id=' + fm.category_id.value;
		if(fm.start_year.value != "" && fm.start_month.value != "" && fm.start_day.value != ""){
			path += '&sd=' + fm.start_year.value + '/' + fm.start_month.value + '/' + fm.start_day.value;
		}
		if(fm.end_year.value != "" && fm.end_month.value != "" && fm.end_day.value != ""){
			path += '&ed=' + fm.end_year.value + '/' + fm.end_month.value + '/' + fm.end_day.value;
		}
		if(fm.t_min.value != "") path += '&t_min=' + fm.t_min.value;
		if(fm.t_max.value != "") path += '&t_max=' + fm.t_max.value;
		if(fm.ticket_start_year.value != "" && fm.ticket_start_month.value != "" && fm.ticket_start_day.value != ""){
			path += '&tsd=' + fm.ticket_start_year.value + '/' + fm.ticket_start_month.value + '/' + fm.ticket_start_day.value;
		}
		if(fm.ticket_end_year.value != "" && fm.ticket_end_month.value != "" && fm.ticket_end_day.value != ""){
			path += '&ted=' + fm.ticket_end_year.value + '/' + fm.ticket_end_month.value + '/' + fm.ticket_end_day.value;
		}
	}
	if(fm.w_type[0].checked == true) path += '&w_type=2';
	if(fm.w_type[1].checked == true) path += '&w_type=0';
	if(fm.w_type[2].checked == true) path += '&w_type=1';
	if(fm.w_type[0].checked == false && fm.w_type[1].checked == false && fm.w_type[2].checked == false){
		path += '&w_type=2';
	}
	if(fm.sv.value != "") path += '&sv=' + utf.URLencode(fm.sv.value);
	if(detail == 1) path += '&detail=1';
	if(sort != "") path += '&sort=' + sort;
	location.href = path;
}
function areaSelect(fm,area_jp_id){
	fm.area_id.value = area_jp_id;
	mainSearch(fm);
}
function watchSelect(fm,w_type){
	fm.w_type.value = w_type;
	mainSearch(fm);
}
function setdate(fm,type){
	fm.start_year.value = n_year;
	fm.start_month.value = n_month;
	fm.start_day.value = n_day;
	if(type == "n"){
		fm.end_year.value = n_year;
		fm.end_month.value = n_month;
		fm.end_day.value = n_day;
	}else if(type == "w"){
		fm.end_year.value = w_year;
		fm.end_month.value = w_month;
		fm.end_day.value = w_day;
	}else if(type == "m"){
		fm.end_year.value = m_year;
		fm.end_month.value = m_month;
		fm.end_day.value = m_day;
	}
}
function clearDate(fm){
	fm.start_year.value = '';
	fm.start_month.value = '';
	fm.start_day.value = '';
	
	fm.end_year.value = '';
	fm.end_month.value = '';
	fm.end_day.value = '';
}
function ticketSetdate(fm,type){
	fm.ticket_start_year.value = n_year;
	fm.ticket_start_month.value = n_month;
	fm.ticket_start_day.value = n_day;
	if(type == "n"){
		fm.ticket_end_year.value = n_year;
		fm.ticket_end_month.value = n_month;
		fm.ticket_end_day.value = n_day;
	}else if(type == "w"){
		fm.ticket_end_year.value = w_year;
		fm.ticket_end_month.value = w_month;
		fm.ticket_end_day.value = w_day;
	}else if(type == "m"){
		fm.ticket_end_year.value = m_year;
		fm.ticket_end_month.value = m_month;
		fm.ticket_end_day.value = m_day;
	}
}
function ticketClearDate(fm){
	fm.ticket_start_year.value = '';
	fm.ticket_start_month.value = '';
	fm.ticket_start_day.value = '';
	
	fm.ticket_end_year.value = '';
	fm.ticket_end_month.value = '';
	fm.ticket_end_day.value = '';
}
function keyCheck(fm){
	if(event.keyCode == 13){
		mainSearch(fm);
	}
}
function searchAreaView(){
	seaObj = document.getElementById('search_detail');
	detailBtnObj = document.getElementById('detailBtn');
	if(detail == 1){
		seaObj.style.display = 'none';
		detailBtnObj.innerHTML = '詳しく検索する';
		detail = 0;
	}else{
		seaObj.style.display = '';
		detailBtnObj.innerHTML = '閉じる';
		detail = 1;
	}
}

//-->