function np(code,type) {
	url = "meisai.html?BCode=" + code + "&Type=" + type;
	w=window.open(url, "meisai", "scrollbars=yes,resizable=yes,toolbar=yes,menubar=0,location=0,directories=0,status=0");
}

function search_submit() {
	document.choice.key.value = "list";
	document.choice.submit();
}

function clorder(cfrom, order) {
	document.choice.cfrom.value = cfrom;
	document.choice.order.value = order;
	document.choice.key.value = "list";
	document.choice.submit();
}

function togglesearch() {
	if (document.getElementById('search').style.display == "none") {
		document.getElementById('search').style.display = "block";
		document.choice.ishide.value = "block";
	} else {
		document.getElementById('search').style.display = "none";
		document.choice.ishide.value = "none";
	}
}

function togglechk(areaid) {
	var id = "chkb_" + areaid;
	if (document.getElementById(id).checked) {
		document.getElementById(id).checked = false;
	} else {
		document.getElementById(id).checked = true;
	}
}

function chkqf(chkType) {
	switch (chkType) {
	case "q":
	case "o":
		if (chkType == "q") {
			if (!document.qf.kind[0].checked && !document.qf.kind[1].checked && !document.qf.kind[2].checked) {
				alert ("お問い合わせ件名を選択してください。");
				return
			}
		}
		if (chkType == "o") {
			if (!document.qf.addr.value) {
				alert ("住所が入力されていません。");
				document.qf.addr.focus();
				return
			}
			if (document.qf.purpose.value.length > 50) {
				alert ("入力可能文字数をオーバーしています。");
				document.qf.purpose.focus();
				return
			}
			if (document.qf.spot.value.length > 50) {
				alert ("入力可能文字数をオーバーしています。");
				document.qf.spot.focus();
				return
			}
			if (document.qf.other.value.length > 250) {
				alert ("入力可能文字数をオーバーしています。");
				document.qf.other.focus();
				return
			}
		}
		if (!document.qf.sender.value) {
			alert ("お名前が入力されていません。");
			document.qf.sender.focus();
			return
		}
		if (!document.qf.kana.value) {
			alert ("フリガナが入力されていません。");
			document.qf.kana.focus();
			return
		}
		if (!document.qf.email.value) {
			alert ("E-mailが入力されていません。");
			document.qf.email.focus();
			return
		}
		if (document.qf.email.value != document.qf.email_re.value) {
			alert ("入力されたE-mailが一致しません。");
			document.qf.email.focus();
			return
		}
		
		if (chkType == "q") {
			if (!document.qf.detail.value) {
				alert ("お問い合わせ内容が入力されていません。");
				document.qf.detail.focus();
				return
			}
			if (document.qf.detail.value.length > 250) {
				alert ("入力可能文字数をオーバーしています。");
				document.qf.detail.focus();
				return
			}
			if (document.qf.kind[0].checked) {
				document.qf.kind_data.value=1;
			}
			if (document.qf.kind[1].checked) {
				document.qf.kind_data.value=2;
			}
			if (document.qf.kind[2].checked) {
				document.qf.kind_data.value=3;
			}
		}
		if (chkType == "o") {
			if (document.qf.plan[0].checked) {
				document.qf.plan_data.value=1;
			}
			if (document.qf.plan[1].checked) {
				document.qf.plan_data.value=2;
			}
			if (document.qf.plan[2].checked) {
				document.qf.plan_data.value=3;
			}

			if (document.qf.hotelg[0].checked) {
				document.qf.hotelg_data.value=1;
			}
			if (document.qf.hotelg[1].checked) {
				document.qf.hotelg_data.value=2;
			}
			if (document.qf.hotelg[2].checked) {
				document.qf.hotelg_data.value=3;
			}
			if (document.qf.hotelg[3].checked) {
				document.qf.hotelg_data.value=4;
			}
			if (document.qf.hotelg[4].checked) {
				document.qf.hotelg_data.value=5;
			}

			if (document.qf.guide[0].checked) {
				document.qf.guide_data.value=1;
			}else{
				document.qf.guide_data.value=0;
			}

			if (document.qf.airport[0].checked) {
				document.qf.airport_data.value=1;
			}else{
				document.qf.airport_data.value=0;
			}

			if (document.qf.ticket[0].checked) {
				document.qf.ticket_data.value=1;
			}else if (document.qf.ticket[1].checked){
				document.qf.ticket_data.value=2;
			}else{
				document.qf.ticket_data.value=0;
			}
		}
		break;
	case "sndq":
		document.qf.sendq.value=1;
		break;
	case "sndo":
		document.qf.sendo.value=1;
	}
	return -1
}

function qfsubmit(chkType, Act) {
	if (this.chkqf(chkType)){
		document.qf.method="POST";
		document.qf.action=Act;
		document.qf.submit();
	}
}

function eblCity(chkFlg) {
	if (chkFlg) {
		if (!document.qf.visitcity.value){
			alert ("訪問を御希望の都市を入力してください。");
			document.qf.visitcity.focus();
		}
		document.qf.visitcity.style.backgroundColor = "";
		document.qf.visitcity.style.style.color = "";
	}else{
		document.qf.visitcity.value="";
		document.qf.visitcity.style.backgroundColor = "#aaaaaa";
		document.qf.visitcity.style.style.color = "#666666";
	}
}

function fcsCity() {
	if (document.qf.plan[0].checked) {
		document.qf.visitcity.blur();
	}
}