/*-----------------------------------------------------------------------
  概要          : ボタン制御
-----------------------------------------------------------------------*/
function btnClick(strKbn) {
	/* 資料請求フォーム */
	if (strKbn == "formDemand01") {
		if ( document.formDemand01.ValueName.value == "" ) {
			alert("お名前を入力してください");
			document.formDemand01.ValueName.focus();
			return false;
		}
		if ( document.formDemand01.ValueKana.value == "" ) {
			alert("ふりがなを入力してください");
			document.formDemand01.ValueKana.focus();
			return false;
		}
		if ( document.formDemand01.ValueMail.value == "" ) {
			alert("メールアドレスを入力してください");
			document.formDemand01.ValueMail.focus();
			return false;
		}
		if ( document.formDemand01.ValueZip.value == "" ) {
			alert("郵便番号を入力してください");
			document.formDemand01.ValueZip.focus();
			return false;
		}
		if ( document.formDemand01.ValueAddr.value == "" ) {
			alert("ご住所を入力してください");
			document.formDemand01.ValueAddr.focus();
			return false;
		}
		if ( document.formDemand01.ValueTel.value == "" ) {
			alert("電話番号を入力してください");
			document.formDemand01.ValueTel.focus();
			return false;
		}
		ii=0;
        for (i=0; i<document.formDemand01.ValueHow.length; i++) {
			if ( document.formDemand01.ValueHow[i].checked == true) {
				ii=1;
				break;
			}
		}
		if ( ii==0 ) {
			alert("何でお知りになったかをチェックしてください");
			return false;
		}
		document.formDemand01.action = "confirm.asp";
		document.formDemand01.submit();
	/* お問い合わせフォーム */
	} else if (strKbn == "formDemand02") {
		if ( document.formDemand02.ValueName.value == "" ) {
			alert("お名前を入力してください");
			document.formDemand02.ValueName.focus();
			return false;
		}
		if ( document.formDemand02.ValueMail.value == "" ) {
			alert("メールアドレスを入力してください");
			document.formDemand02.ValueMail.focus();
			return false;
		}
		ii=0;
        for (i=0; i<document.formDemand02.ValueHow.length; i++) {
			if ( document.formDemand02.ValueHow[i].checked == true) {
				ii=1;
				break;
			}
		}
		if ( ii==0 ) {
			alert("何でお知りになったかをチェックしてください");
			return false;
		}
		document.formDemand02.action = "confirm.asp";
		document.formDemand02.submit();
	/* 講師募集フォーム */
	} else if (strKbn == "formDemand03") {
		if ( document.formDemand03.ValueName.value == "" ) {
			alert("お名前を入力してください");
			document.formDemand03.ValueName.focus();
			return false;
		}
		if ( document.formDemand03.ValueKana.value == "" ) {
			alert("ふりがなを入力してください");
			document.formDemand03.ValueKana.focus();
			return false;
		}
		if ( document.formDemand03.ValueMail.value == "" ) {
			alert("メールアドレスを入力してください");
			document.formDemand03.ValueMail.focus();
			return false;
		}
		if ( document.formDemand03.ValueZip.value == "" ) {
			alert("郵便番号を入力してください");
			document.formDemand03.ValueZip.focus();
			return false;
		}
		if ( document.formDemand03.ValueAddr.value == "" ) {
			alert("ご住所を入力してください");
			document.formDemand03.ValueAddr.focus();
			return false;
		}
		if ( document.formDemand03.ValueTel.value == "" ) {
			alert("電話番号を入力してください");
			document.formDemand03.ValueTel.focus();
			return false;
		}
		if ( document.formDemand03.ValueAge.value == "" ) {
			alert("年齢を入力してください");
			document.formDemand03.ValueAge.focus();
			return false;
		}
		if ( document.formDemand03.ValueJob.value == "" ) {
			alert("職業を入力してください");
			document.formDemand03.ValueJob.focus();
			return false;
		}
		ii=0;
        for (i=0; i<document.formDemand03.ValueHow.length; i++) {
			if ( document.formDemand03.ValueHow[i].checked == true) {
				ii=1;
				break;
			}
		}
		if ( ii==0 ) {
			alert("何でお知りになったかをチェックしてください");
			return false;
		}
		if ( document.formDemand03.TextArea.value == "" ) {
			alert("講座内容を入力してください");
			document.formDemand03.TextArea.focus();
			return false;
		}
		document.formDemand03.action = "confirm.asp";
		document.formDemand03.submit();
	}
	return true;
}
/*-----------------------------------------------------------------------
  概要          : リセットボタン制御
-----------------------------------------------------------------------*/
function btnReset( strForm ) {
	if ( strForm == "formDemand01" ) {
		document.formDemand01.action = "index.asp";
		document.formDemand01.submit();
	} else if ( strForm == "formDemand02" ) {
		document.formDemand02.action = "index.asp";
		document.formDemand02.submit();
	} else if ( strForm == "formDemand03" ) {
		document.formDemand03.action = "index.asp";
		document.formDemand03.submit();
	}
}
/*-----------------------------------------------------------------------
  概要          : ボタン制御
-----------------------------------------------------------------------*/
function btnSend( strForm, varURL ) {
	if (strForm == "form1") {
		document.form1.action = varURL;
		document.form1.submit();
	} else if (strForm == "form2") {
		document.form2.action = varURL;
		document.form2.submit();
	}
}
/*-----------------------------------------------------------------------
  概要          : 検索結果コマンド
-----------------------------------------------------------------------*/
function btnResult( strCmd , strV1 ) {
	if ( strCmd == "page" ) {
		document.FormResult.PageNo.value = strV1;
		document.FormResult.action = "index.asp";
	}
	if ( strCmd == "jump_detail" ) {
		document.FormResult.CLASS.value = strV1;
		document.FormResult.action = "../class/index.asp";
	}
	if ( strCmd == "jump_list" ) {
		document.FormResult.PageNo.value = 1;
		document.FormResult.LECTURE.value = strV1;
		document.FormResult.action = "result.asp";
	}
	document.FormResult.submit();
}
/*-----------------------------------------------------------------------
  概要          : 書籍在庫照会
-----------------------------------------------------------------------*/
function BookSLink( strProdCD ) {
	document.BookS.ProdCD.value = strProdCD;
	document.BookS.submit();
}
