function Chk()
{

    if(document.entry.elements["data[sei]"].value==""){
		alert("氏名（姓）は入力必須項目です");
		document.entry.elements["data[sei]"].focus();
		return false;
    }
	str = document.entry.elements["data[sei]"].value;
	if(str.length > 10){
		alert('氏名（姓）は10文字桁以内で入力してください');
		document.form1.elements["data[sei]"].focus();
		return false;
	}
    if(document.entry.elements["data[mei]"].value==""){
		alert("氏名（名）は入力必須項目です");
		document.entry.elements["data[mei]"].focus();
		return false;
    }
	str = document.entry.elements["data[mei]"].value;
	if(str.length > 10){
		alert('氏名（名）は10文字桁以内で入力してください');
		document.form1.elements["data[mei]"].focus();
		return false;
	}
    if(document.entry.elements["data[sei_kana]"].value==""){
		alert("フリガナ（姓）は入力必須項目です");
		document.entry.elements["data[sei_kana]"].focus();
		return false;
    }
	str = document.entry.elements["data[sei_kana]"].value;
	if(str.length > 10){
		alert('フリガナ（姓）は10文字桁以内で入力してください');
		document.form1.elements["data[sei_kana]"].focus();
		return false;
	}
    if(document.entry.elements["data[mei_kana]"].value==""){
		alert("フリガナ（名）は入力必須項目です");
		document.entry.elements["data[mei_kana]"].focus();
		return false;
    }
	str = document.entry.elements["data[mei_kana]"].value;
	if(str.length > 10){
		alert('フリガナ（名）は10文字桁以内で入力してください');
		document.form1.elements["data[mei_kana]"].focus();
		return false;
	}

    if(document.entry.elements["data[zip11]"].value=="" && document.entry.elements["data[zip12]"].value!=""){
		alert("郵便番号の前３桁を入力してください");
		document.entry.elements["data[zip11]"].focus();
		return false;
    }
    if(document.entry.elements["data[zip11]"].value=="" && document.entry.elements["data[zip12]"].value==""){
		alert("郵便番号は入力必須項目です");
		document.entry.elements["data[zip11]"].focus();
		return false;
    }
    if(document.entry.elements["data[zip11]"].value!="" && document.entry.elements["data[zip12]"].value==""){
		alert("郵便番号の後４桁を入力してください");
		document.entry.elements["data[zip12]"].focus();
		return false;
    }
    if(document.entry.elements["data[pref1]"].selectedIndex==0){
		alert("都道府県は入力必須項目です");
		document.entry.elements["data[pref1]"].focus();
		return false;
    }
    if(document.entry.elements["data[address11]"].value==""){
		alert("市区町村は入力必須項目です");
		document.entry.elements["data[address11]"].focus();
		return false;
    }
	str = document.entry.elements["data[address11]"].value;
	if(str.length > 35){
		alert('市区町村は35文字桁以内で入力してください');
		document.form1.elements["data[address11]"].focus();
		return false;
	}
	str = document.entry.elements["data[address12]"].value;
	if(str.length > 35){
		alert('住所(続き)は35文字桁以内で入力してください');
		document.form1.elements["data[address12]"].focus();
		return false;
	}
    if(document.entry.elements["data[tel1]"].value==""){
		alert("電話番号は入力必須項目です");
		document.entry.elements["data[tel1]"].focus();
		return false;
    }

    if(document.entry.elements["data[flg]"].checked == false){
	    if(document.entry.elements["data[zip21]"].value=="" && document.entry.elements["data[zip22]"].value!=""){
			alert("郵便番号の前３桁を入力してください");
			document.entry.elements["data[zip21]"].focus();
			return false;
	    }
	    if(document.entry.elements["data[zip21]"].value=="" && document.entry.elements["data[zip22]"].value==""){
			alert("郵便番号は入力必須項目です");
			document.entry.elements["data[zip21]"].focus();
			return false;
	    }
	    if(document.entry.elements["data[zip21]"].value!="" && document.entry.elements["data[zip22]"].value==""){
			alert("郵便番号の後４桁を入力してください");
			document.entry.elements["data[zip22]"].focus();
			return false;
	    }
	    if(document.entry.elements["data[pref2]"].selectedIndex==0){
			alert("都道府県は入力必須項目です");
			document.entry.elements["data[pref2]"].focus();
			return false;
	    }
	    if(document.entry.elements["data[address21]"].value==""){
			alert("市区町村は入力必須項目です");
			document.entry.elements["data[address21]"].focus();
			return false;
	    }
		str = document.entry.elements["data[address21]"].value;
		if(str.length > 35){
			alert('市区町村は35文字桁以内で入力してください');
			document.form1.elements["data[address21]"].focus();
			return false;
		}
		str = document.entry.elements["data[address22]"].value;
		if(str.length > 35){
			alert('住所(続き)は35文字桁以内で入力してください');
			document.form1.elements["data[address22]"].focus();
			return false;
		}
	    if(document.entry.elements["data[tel2]"].value==""){
			alert("電話番号は入力必須項目です");
			document.entry.elements["data[tel2]"].focus();
			return false;
	    }
    }

    if(document.entry.elements["data[school]"].value==""){
		alert("学校名は入力必須項目です");
		document.entry.elements["data[school]"].focus();
		return false;
    }
	str = document.entry.elements["data[school]"].value;
	if(str.length > 35){
		alert('学部・学科は35文字桁以内で入力してください');
		document.form1.elements["data[school]"].focus();
		return false;
	}
    if(document.entry.elements["data[faculty]"].value==""){
		alert("学部・学科は入力必須項目です");
		document.entry.elements["data[faculty]"].focus();
		return false;
    }
	str = document.entry.elements["data[faculty]"].value;
	if(str.length > 35){
		alert('学部・学科は35文字桁以内で入力してください');
		document.form1.elements["data[faculty]"].focus();
		return false;
	}

    if(document.entry.elements["data[grady]"].value==""||document.entry.elements["data[gradm]"].value==""){
		alert("卒業予定年月は入力必須項目です");
		document.entry.elements["data[grady]"].focus();
		return false;
    }
	str = document.entry.elements["data[seminar]"].value;
	if(str.length > 20){
		alert('ゼミ・研究室名は20文字桁以内で入力してください');
		document.form1.elements["data[seminar]"].focus();
		return false;
	}
	str = document.entry.elements["data[professor]"].value;
	if(str.length > 10){
		alert('教授・指導教官名は10文字桁以内で入力してください');
		document.form1.elements["data[professor]"].focus();
		return false;
	}
	str = document.entry.elements["data[club_etc]"].value;
	if(str.length > 20){
		alert('サークル名称は20文字桁以内で入力してください');
		document.form1.elements["data[club_etc]"].focus();
		return false;
	}



    if(document.entry.elements["data[email]"].value||document.entry.elements["data[pmail1]"].value){
		var chkEmail = document.entry.elements["data[email]"].value;
		var chkPmail = document.entry.elements["data[pmail1]"].value + document.entry.elements["data[pmail2]"].value;
		var newstr = "";
		var at1 = false;
		var dot1 = false;
		var at2 = false;
		var dot2 = false;
	
		if (chkEmail.indexOf("@") != -1) {
			at1 = true;
		} else if (chkEmail.indexOf(".") != -1) {
			dot1 = true;
		}
		for (var i = 0; i < chkEmail.length; i++) {
			ch = chkEmail.substring(i, i + 1)
			if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
				|| (ch == "@") || (ch == ".") || (ch == "_")
				|| (ch == "-") || (ch >= "0" && ch <= "9")) {
				newstr += ch;
				if (ch == "@") {
					at1=true;
				}
				if (ch == ".") {
					dot1=true;
				}
			}
		}

		if (chkPmail.indexOf("@") != -1) {
			at2 = true;
		} else if (chkPmail.indexOf(".") != -1) {
			dot2 = true;
		}
		for (var i = 0; i < chkPmail.length; i++) {
			ch = chkPmail.substring(i, i + 1)
			if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
				|| (ch == "@") || (ch == ".") || (ch == "_")
				|| (ch == "-") || (ch >= "0" && ch <= "9")) {
				newstr += ch;
				if (ch == "@") {
					at2=true;
				}
				if (ch == ".") {
					dot2=true;
				}
			}
		}
		if (((!at1) || (!dot1))||((!at2) || (!dot2))) {
			alert("e-mail の文字列が不正です");
			document.entry.elements["data[email]"].focus();
			return false;
		}
    }
    else {
		alert("メールアドレスは入力必須項目です");
		document.entry.elements["data[email]"].focus();
		return false;
    }



    document.entry.submit();
}
