// ++++++++++++++++++++++++++++++++++++++
// 名前：err_check
// 概要：個人情報入力チェック
// パラメータ
//		form
// ++++++++++++++++++++++++++++++++++++++
function err_check(form) {									// 入力項目チェック

// *****************
// 名前
// *****************
		//必須チェック
		if (document.form1.name.value == "") {	
			alert ("お名前を入力して下さい" );
			document.form1.name.focus();
			return false;
		}

		if(check_zenkaku1(document.form1.name.value) == false){
			document.form1.name.focus();
			document.form1.name.select();
			alert("名前は全角で入力して下さい");
			return false;
		}

// *****************
// email
// *****************
		if ((document.form1.email1.value == "")||(document.form1.email2.value == "")) {
			alert ("メールアドレスを入力して下さい。" );
			document.form1.email1.focus();
			return false;
		}

		if ((document.form1.email1.value.indexOf("@") > 0)||(document.form1.email2.value.indexOf("@") > 0)){
			alert ("メールアドレスが正しくありません" );
			document.form1.email1.focus();
			return false;
		}

		if ((document.form1.email1.value.indexOf(",") > 0)||(document.form1.email2.value.indexOf(",") > 0)){
			alert ("メールアドレスが正しくありません" );
			document.form1.email1.focus();
			return false;
		}

// *****************
// 問い合わせ
// *****************

	chk_flg = 99;
	for (i=0 ; i< document.form1.content.length ; i++){
		if(document.form1.content[i].checked) {
			chk_flg = i;
			break;
		}
	}
	if (chk_flg == 99) {
		alert ("お問い合わせ内容をお選びください");
		document.form1.content[0].focus();
		return false;
	}

	// 必須チェック：問い合わせテキスト
	if((document.form1.cont_text.value == "")||(document.form1.cont_text.value == "お問い合わせ内容をご記入ください。")){
		alert ("お問い合わせ内容をご記入下さい" );
		document.form1.cont_text.focus();
		return false;
	}

	// 半角チェック：問い合わせテキスト
	if(check_zenkaku2(document.form1.cont_text.value) == false){
		alert("お問い合わせ内容は半角カナ以外で入力して下さい");
		document.form1.cont_text.focus();
		document.form1.cont_text.select();
		return false;
	}

	return true;

}
// *****************
// 送信確認
// *****************
function  send_check(form) {
	if (err_check(form)) {
		form.action = "kakunin.php";
		form.submit();
	}
}

// *************************************
// 送信確認
// *************************************

function  back_check(form) {								// 戻る

	document.form1.action = "contact.php";
	document.form1.submit();
}

function send_check2(form) {									// 登録
	if(act_reg(1)){
		document.form1.submit();
	}
}
function act_reg(num){										// 確認アラート
	switch(num){
	case 1:													// 登録確認
		res = confirm("このデータを送信します。よろしいですか?");
		return res;
		break;
	}
}

