//SHOW & HIDE
function show(id01,id02,id03,id04){
if(document.getElementById){
	if(document.getElementById(id01).style.display == "none" && document.getElementById(id02).style.display == "none" && document.getElementById(id03).style.display == "none" && document.getElementById(id04).style.display == "none"){
	document.getElementById(id01).style.display = "";
	document.getElementById(id02).style.display = "";
	document.getElementById(id03).style.display = "";
	document.getElementById(id04).style.display = "";
	}else{
	document.getElementById(id01).style.display = "none";
	document.getElementById(id02).style.display = "none";
	document.getElementById(id03).style.display = "none";
	document.getElementById(id04).style.display = "none";
	}
}
}

function checkForm(form){
	if (check_name(form) == false)
	return false;
	if (check_email(form) == false)
	return false;
	if (check_question(form) == false)
	return false;
//資料請求
	if (form.request.checked == true){
		if (check_zip(form) == false)
		return false;
		if (check_add(form) == false)
		return false;
}
}
//-------------------------------------------------------
function check_name(form){
	var lstname = form.lstname.value;
	var fstname = form.fstname.value;
	if ((lstname == "") && (fstname == "")){
	alert("姓名のどちらかをご記入ください");
	form.lstname.focus();
	return false;
}
}
function check_email(form){
	var email = form.email.value;
	if (email == ""){
	alert("E-mailアドレスをご記入下さい");
	form.email.focus();
	return false;
}
	var str = form.email.value;
	if (str != str.match("^[0-9a-zA-Z\-\_\.]+@[0-9a-zA-Z\-\_\.]+\\.[0-9a-zA-Z\-\_]+$")){
	alert("E-mailアドレスに誤りがないかご確認下さい");
	form.email.focus();
	return false;
}
}
function check_question(form){
	var question = form.question.value;
	if (question == ""){
	alert("お問い合わせ内容をご記入下さい");
	form.question.focus();
	return false;
}
}
function check_zip(form){
	var question = form.zip1.value;
	if (question == ""){
	alert("郵便番号をご記入下さい");
	form.zip1.focus();
	return false;
}
	var question = form.zip2.value;
	if (question == ""){
	alert("郵便番号をご記入下さい");
	form.zip2.focus();
	return false;
}
}
function check_add(form){
	var question = form.add1.value;
	if (question == ""){
	alert("住所 都道府県 を選択して下さい");
	form.add1.focus();
	return false;
}
	var question = form.add2.value;
	if (question == ""){
	alert("住所 市町村 をご記入下さい");
	form.add2.focus();
	return false;
}
	var question = form.add3.value;
	if (question == ""){
	alert("住所 番地・建物名 をご記入下さい");
	form.add3.focus();
	return false;
}
}
