<!--
function changeYear(){
		var thisForm = document.frm;
		if(thisForm.birthday2.value=="01"||thisForm.birthday2.value=="03"||thisForm.birthday2.value=="05"||thisForm.birthday2.value=="07"||thisForm.birthday2.value=="08"||thisForm.birthday2.value=="10"||thisForm.birthday2.value=="12"){
//				thisForm.birthday3.options.length = "31";
				thisForm.birthday3.options.length = "32";
//			for(i=0;i<31;i++){
			for(i=1;i<=31;i++){
				//var t = i + 1;
				var t = i;
				if(t<10)t = "0" + t;
				thisForm.birthday3.options[i].text=t;
				thisForm.birthday3.options[i].value=t;
			}
		}

		if(thisForm.birthday2.value=="02"){
//				thisForm.birthday3.options.length = "29";
				thisForm.birthday3.options.length = "30";
			//for(i=0;i<29;i++){
			for(i=1;i<=29;i++){
				//var t = i + 1;
				var t = i;
				if(t<10)t = "0" + t;
				thisForm.birthday3.options[i].text=t;
				thisForm.birthday3.options[i].value=t;
			}
		}

		if(thisForm.birthday2.value=="04"||thisForm.birthday2.value=="06"||thisForm.birthday2.value=="09"||thisForm.birthday2.value=="11"){
//				thisForm.birthday3.options.length = "30";
				thisForm.birthday3.options.length = "31";
			//for(i=0;i<30;i++){
			for(i=1;i<=30;i++){
				//var t = i + 1;
				var t = i;
				if(t<10)t = "0" + t;
				thisForm.birthday3.options[i].text=t;
				thisForm.birthday3.options[i].value=t;
			}
		}

		if(thisForm.birthday2.value==""){
			thisForm.birthday3.options.length = "1";
		}
}



function getByteLength(str) {
 //alert("str = " + str + ",str.length = " + str.length);
 var len = 0;

    for (var i = 0; i < str.length; i++) {
        var oneChar = escape(str.charAt(i));
        if ( oneChar.length == 1 ) {
            len ++;
        } else if (oneChar.indexOf("%u") != -1) {
            len += 2;
        } else if (oneChar.indexOf("%") != -1) {
            len+= oneChar.length/3;
        }
    }
 return len;
}


function specialCheck(msg){

	var checkword = "~!@#$%^&*()_+|\=-}{][\":';?></.,\\";
	for(i=0;i<checkword.length;i++){
		if(msg.indexOf(checkword.substring(i,i+1))>-1)return true;
	}
	return false;
}



function isEmail(str){
	var check1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
	var check2 = /^[a-zA-Z0-9\-\.\=\!\”\$\’\(\/\*\+\,\;\&\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4})$/;
	if(!check1.test(str) && check2.test(str)){
		return true;
	}else{
		return false;
	}
}


/*
function isEmail(str) {
	var supported = 0;
	if (window.RegExp) {
		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
	}
	if (!supported)
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
		var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
		var r2 = new RegExp
		("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	return (!r1.test(str) && r2.test(str));
}*/


function emailCheck(msg){
	msg = msg.toLowerCase();
	var checkword = "abcdefghijklmnopqrstuvwxyz0123456789.@-_~”!$&’(/*+,;=";
	for(i=0;i<msg.length;i++){
		if(checkword.indexOf(msg.substring(i,i+1))==-1)return true;
	}
	return false;
}

function IsID(realform,formname) {
     var form=eval("document."+realform+"."+formname);

     if(form.value.length < 4 || form.value.length > 10) {
         return false;
     }
     for(var i=0; i < form.value.length; i++) {
         var chr = form.value.substr(i,1);
         if((chr < '0' || chr > '9') && (chr < 'a' || chr > 'z')) {
            return false;
         }
     }
     return true;
}


function IsPW(realform,formname) {

     var form=eval("document."+realform+"."+formname);

     if(form.value.length < 4 || form.value.length > 10) {
         return false;
     }
     for(var i=0; i < form.value.length; i++) {
         var chr = form.value.substr(i,1);
         if((chr < '0' || chr > '9') && (chr < 'a' || chr > 'z') && ( chr < 'A' || chr > 'Z')) {
            return false;
         }
     }
     return true;
 }


function junCheck(elm){
	var txt=elm.value;
	for(i=0;i<txt.length;i++){
		if(escape(txt.charAt(i)).length<4){
			return false;
		}
	}
	return true;
}

function kataCheck(msg){
	var checkword="ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶー";

	for(i=0;i<msg.length;i++){
		if(checkword.indexOf(msg.substring(i,i+1))==-1)return false;
	}
	return true;
}



//############## 회원가입1 ###########################################
function formGo1(){
	var thisForm = document.frm;

	if(thisForm.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.email.focus()
		return;
	}

	if(!isEmail(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(emailCheck(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(thisForm.email_confirm.value!=thisForm.email.value){
		alert('メールアドレスが一致しません。');
		thisForm.email_confirm.focus()
		return;
	}

	if(!thisForm.agree.checked) {
		alert('利用規約をチェックをしてください');
		return ;
   }
	
	thisForm.action="login_process.php?mode=join01";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입1 ###########################################





//############## 회원가입1-1 ###########################################
function formGo1_1(){
	var thisForm = document.frm;

	if(thisForm.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.email.focus()
		return;
	}

	if(!isEmail(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(emailCheck(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(thisForm.email_confirm.value!=thisForm.email.value){
		alert('メールアドレスが一致しません。');
		thisForm.email_confirm.focus()
		return;
	}
	
	thisForm.action="login_process.php?mode=join01-1";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입1-2 ###########################################






//############## 회원가입2 ###########################################
function formGo2(){
	var thisForm = document.frm;

	if(!thisForm.userid.value){
		alert('IDを入力してください。');
		thisForm.userid.focus()
		return;
	}

	if(!IsID('frm',thisForm.userid.name)) {
		alert("IDは4以上10文字以下、半角英数字で入力してください。");
		thisForm.userid.focus();
		thisForm.userid.select();
		return ;
	}

	if(thisForm.userid.value!=thisForm.userid_re.value){
		alert('ID重複確認をしてください');
		thisForm.userid.focus()
		return;
	}

	if(thisForm.handlename.value==""){
		alert('ハンドルネームを入力してください');
		thisForm.handlename.focus()
		return;
	}

	if (getByteLength(thisForm.handlename.value) >24){
		alert('ハンドルネームは全角12文字以内で入力してください。');
		thisForm.handlename.focus()
		return;
	}

	if(specialCheck(thisForm.handlename.value)){
		alert("ハンドルネームに半角記号は入力できません。");
		return;
	}


	if(thisForm.handlename.value!=thisForm.handlename_re.value){
		alert('ハンドルネームの重複チェックを行ってください');
		thisForm.handlename.focus()
		return;
	}


	if(!thisForm.userpwd.value){
		alert('パスワードを入力してください。');
		thisForm.userpwd.focus()
		return;
	}

	if(!IsPW('frm',thisForm.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userpwd.focus();
		thisForm.userpwd.select();
		return;
	}


	if(thisForm.userpwd_confirm.value!=thisForm.userpwd.value){
		alert('パスワードが一致しません。');
		thisForm.userpwd_confirm.focus()
		return;
	}

	if(thisForm.realnm1.value==""){
		alert('名前を入力してください。');
		thisForm.realnm1.focus()
		return;
	}

	if(!junCheck(thisForm.realnm1)){
		alert('名前は全角で入力してください');
		thisForm.realnm1.focus()
		return;
	}

	if(thisForm.realnm2.value==""){
		alert('名前を入力してください。');
		thisForm.realnm2.focus()
		return;
	}

	if(!junCheck(thisForm.realnm2)){
		alert('名前は全角で入力してください');
		thisForm.realnm2.focus()
		return;
	}


	if(thisForm.kananm1.value==""){
		alert('フリガナを入力してください。');
		thisForm.kananm1.focus()
		return;
	}

	if(!kataCheck(thisForm.kananm1.value)){
		alert('フリガナは全角カタカナで入力してください。');
		thisForm.kananm1.focus()
		return;
	}


	if(thisForm.kananm2.value==""){
		alert('フリガナを入力してください。');
		thisForm.kananm2.focus()
		return;
	}

	if(!kataCheck(thisForm.kananm2.value)){
		alert('フリガナは全角カタカナで入力してください。');
		thisForm.kananm2.focus()
		return;
	}

	checkpoint1 = false;
	for(i=0; i<thisForm.gender.length; i++){
		if(thisForm.gender[i].checked == true){
			checkpoint1 = true;
		}
	}
	if(checkpoint1 == false){
		alert("性別を入力してください。");
		return;
	}

	if(isNaN(thisForm.birthday1.value)){
		alert('年度は半角数字で入力してください。');
		thisForm.birthday1.focus()
		return;
	}

	if(thisForm.birthday1.value==""||thisForm.birthday1.value.length<4){
		alert('生年月日を入力してください。');
		thisForm.birthday1.focus()
		return;
	}

	if(thisForm.birthday2.value==""){
		alert('生年月日を入力してください。');
		thisForm.birthday2.focus()
		return;
	}

	if(thisForm.birthday3.value==""){
		alert('生年月日を入力してください。');
		thisForm.birthday3.focus()
		return;
	}
	
	
	if(thisForm.zip1.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip1.focus()
		return;
	}
 
	if(isNaN(thisForm.zip1.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip1.focus()
		return;
	}

	if(thisForm.zip2.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(isNaN(thisForm.zip2.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(thisForm.address.value==""){
		alert('地域を選択してください。');
		thisForm.address.focus()
		return;
	}

	if(thisForm.city.value==""){
		alert('市区町村を入力してください。');
		thisForm.city.focus()
		return;
	}

	if(thisForm.street1.value==""){
		alert('番地を入力してください。');
		thisForm.street1.focus()
		return;
	}

	if(thisForm.phone1.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(isNaN(thisForm.phone1.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(thisForm.phone2.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(isNaN(thisForm.phone2.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(thisForm.phone3.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone3.focus()
		return;
	}

	if(isNaN(thisForm.phone3.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone3.focus()
		return;
	}

	

	/*checkpoint = false;
	for(i=0; i<thisForm.hana_paper_flg.length; i++){
		if(thisForm.hana_paper_flg[i].checked == true){
			checkpoint = true;
		}
	}
	if(checkpoint == false){
		alert("メール通信を入力してください。");
		return;
	}*/
 
	//thisForm.action="login_process.php?mode=join";
	thisForm.action="join03.php";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입2 ###########################################





//############## 회원가입2 ###########################################
function formGo2_test(){
	var thisForm = document.frm;

	if(!thisForm.userid.value){
		alert('IDを入力してください。');
		thisForm.userid.focus()
		return;
	}

	if(!IsID('frm',thisForm.userid.name)) {
		alert("IDは4以上10文字以下、半角英数字で入力してください。");
		thisForm.userid.focus();
		thisForm.userid.select();
		return ;
	}

	if(thisForm.userid.value!=thisForm.userid_re.value){
		alert('ID重複確認をしてください');
		thisForm.userid.focus()
		return;
	}

	if(thisForm.handlename.value==""){
		alert('ハンドルネームを入力してください');
		thisForm.handlename.focus()
		return;
	}

	if (getByteLength(thisForm.handlename.value) >24){
		alert('ハンドルネームは全角12文字以内で入力してください。');
		thisForm.handlename.focus()
		return;
	}

	if(specialCheck(thisForm.handlename.value)){
		alert("ハンドルネームに半角記号は入力できません。");
		return;
	}


	if(thisForm.handlename.value!=thisForm.handlename_re.value){
		alert('ハンドルネームの重複チェックを行ってください');
		thisForm.handlename.focus()
		return;
	}


	if(!thisForm.userpwd.value){
		alert('パスワードを入力してください。');
		thisForm.userpwd.focus()
		return;
	}

	if(!IsPW('frm',thisForm.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userpwd.focus();
		thisForm.userpwd.select();
		return;
	}


	if(thisForm.userpwd_confirm.value!=thisForm.userpwd.value){
		alert('パスワードが一致しません。');
		thisForm.userpwd_confirm.focus()
		return;
	}

	if(thisForm.realnm1.value==""){
		alert('名前を入力してください。');
		thisForm.realnm1.focus()
		return;
	}

	if(!junCheck(thisForm.realnm1)){
		alert('名前は全角で入力してください');
		thisForm.realnm1.focus()
		return;
	}

	if(thisForm.realnm2.value==""){
		alert('名前を入力してください。');
		thisForm.realnm2.focus()
		return;
	}

	if(!junCheck(thisForm.realnm2)){
		alert('名前は全角で入力してください');
		thisForm.realnm2.focus()
		return;
	}


	if(thisForm.kananm1.value==""){
		alert('フリガナを入力してください。');
		thisForm.kananm1.focus()
		return;
	}

	if(!kataCheck(thisForm.kananm1.value)){
		alert('フリガナは全角カタカナで入力してください。');
		thisForm.kananm1.focus()
		return;
	}


	if(thisForm.kananm2.value==""){
		alert('フリガナを入力してください。');
		thisForm.kananm2.focus()
		return;
	}

	if(!kataCheck(thisForm.kananm2.value)){
		alert('フリガナは全角カタカナで入力してください。');
		thisForm.kananm2.focus()
		return;
	}

	checkpoint1 = false;
	for(i=0; i<thisForm.gender.length; i++){
		if(thisForm.gender[i].checked == true){
			checkpoint1 = true;
		}
	}
	if(checkpoint1 == false){
		alert("性別を入力してください。");
		return;
	}

	if(isNaN(thisForm.birthday1.value)){
		alert('年度は半角数字で入力してください。');
		thisForm.birthday1.focus()
		return;
	}

	if(thisForm.birthday1.value==""||thisForm.birthday1.value.length<4){
		alert('生年月日を入力してください。');
		thisForm.birthday1.focus()
		return;
	}

	if(thisForm.birthday2.value==""){
		alert('生年月日を入力してください。');
		thisForm.birthday2.focus()
		return;
	}

	if(thisForm.birthday3.value==""){
		alert('生年月日を入力してください。');
		thisForm.birthday3.focus()
		return;
	}
	
	checkpoint2 = false;
	for(i=0; i<thisForm.saletype.length; i++){
		if(thisForm.saletype[i].checked == true){
			checkpoint2 = true;
		}
	}
	if(checkpoint2 == false){
		alert("割引タイプを入力してください。");
		return;
	}


	if(thisForm.zip1.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip1.focus()
		return;
	}
 
	if(isNaN(thisForm.zip1.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip1.focus()
		return;
	}

	if(thisForm.zip2.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(isNaN(thisForm.zip2.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(thisForm.address.value==""){
		alert('地域を選択してください。');
		thisForm.address.focus()
		return;
	}

	if(thisForm.city.value==""){
		alert('市区町村を入力してください。');
		thisForm.city.focus()
		return;
	}

	if(thisForm.street1.value==""){
		alert('番地を入力してください。');
		thisForm.street1.focus()
		return;
	}

	if(thisForm.phone1.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(isNaN(thisForm.phone1.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(thisForm.phone2.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(isNaN(thisForm.phone2.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(thisForm.phone3.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone3.focus()
		return;
	}

	if(isNaN(thisForm.phone3.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone3.focus()
		return;
	}

	

	/*checkpoint = false;
	for(i=0; i<thisForm.hana_paper_flg.length; i++){
		if(thisForm.hana_paper_flg[i].checked == true){
			checkpoint = true;
		}
	}
	if(checkpoint == false){
		alert("メール通信を入力してください。");
		return;
	}*/
 
	//thisForm.action="login_process.php?mode=join";
	thisForm.action="join03_test.php";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입2 ###########################################






//############## 회원가입3 ###########################################
function formGo3_test(){
	var thisForm = document.frm;

 
	thisForm.action="login_process.php?mode=join_test";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입3 ###########################################






//############## 회원가입3 ###########################################
function formGo3(){
	var thisForm = document.frm;

 
	thisForm.action="login_process.php?mode=join";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입3 ###########################################




//############## 회원가입 오류정정 ###########################################
function formGo4(msign){
	var thisForm = document.frm;

	if(msign =='t'){
		if(isNaN(thisForm.birthday1.value)){
			alert('年度は半角数字で入力してください。');
			thisForm.birthday1.focus()
			return false;
		}

		if(thisForm.birthday1.value==""||thisForm.birthday1.value.length<4){
			alert('生年月日を入力してください。');
			thisForm.birthday1.focus()
			return false;
		}

		if(thisForm.birthday2.value==""){
			alert('生年月日を入力してください。');
			thisForm.birthday2.focus()
			return false;
		}

		if(thisForm.birthday3.value==""){
			alert('生年月日を入力してください。');
			thisForm.birthday3.focus()
			return false;
		}

		if(thisForm.hmail1.value==""){
			alert('携帯電話のメールアドレスを入力してください。');
			thisForm.hmail1.focus()
			return false;
		}

		if(thisForm.hmail2.value==""){
			alert('携帯電話のメールアドレスを入力してください。');
			thisForm.hmail2.focus()
			return false;
		}
	}else if(msign == 'b'){
		if(isNaN(thisForm.birthday1.value)){
			alert('年度は半角数字で入力してください。');
			thisForm.birthday1.focus()
			return false;
		}

		if(thisForm.birthday1.value==""||thisForm.birthday1.value.length<4){
			alert('生年月日を入力してください。');
			thisForm.birthday1.focus()
			return false;
		}

		if(thisForm.birthday2.value==""){
			alert('生年月日を入力してください。');
			thisForm.birthday2.focus()
			return false;
		}

		if(thisForm.birthday3.value==""){
			alert('生年月日を入力してください。');
			thisForm.birthday3.focus()
			return false;
		}

	}else if(msign == 'h'){
		if(thisForm.hmail1.value==""){
			alert('携帯電話のメールアドレスを入力してください。');
			thisForm.hmail1.focus()
			return false;
		}

		if(thisForm.hmail2.value==""){
			alert('携帯電話のメールアドレスを入力してください。');
			thisForm.hmail2.focus()
			return false;
		}
	}

	//thisForm.action="join03.php";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원가입오류정정 ###########################################




//############## 회원메일 주소 수정 ###########################################
function formGo5(){
	var thisForm = document.frm;

	if(thisForm.now_email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.now_email.focus()
		return;
	}

	if(!isEmail(thisForm.now_email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.now_email.focus()
		return;
	}

	if(emailCheck(thisForm.now_email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.now_email.focus()
		return;
	}

	if(thisForm.future_email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.future_email.focus()
		return;
	}

	if(!isEmail(thisForm.future_email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.future_email.focus()
		return;
	}

	if(emailCheck(thisForm.future_email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.future_email.focus()
		return;
	}
	
	thisForm.action="login_process.php?mode=join_email";
	thisForm.target = "_self";

	thisForm.submit();

}


//############## 회원가입1-2 ###########################################





//############## 회원가입시 아이디 중복체크 ####################
function check_ID_Window(ref) {
   var thisForm = document.frm;

   if(!thisForm.userid.value) {
      alert('会員IDは半角英数字で入力してください。');
	  thisForm.userid.focus();
	  return;
   }else {
		if(!IsID('frm',thisForm.userid.name)) {
			alert("会員IDは半角英数字で4文字以上10文字以下で入力してください。");
			thisForm.userid.focus();
			thisForm.userid.select();
			return ;
		}else {
			ref = ref + "?userid=" + thisForm.userid.value;
			var window_left = (screen.width-640)/2;
			var window_top = (screen.height-480)/2;
			window.open(ref,"checkIDWin",'width=500,height=300,scrollbars=no,status=no,top=' + window_top + ',left=' + window_left + '');
		}
	}
 }
//############## 회원가입시 아이디 중복체크 ####################



//############## 회원가입시 핸들네임 중복체크 ####################
function openHnCheck() {
	var thisForm = document.frm;

	if(!thisForm.handlename.value){
		alert('ハンドルネームを入力してください');
		thisForm.handlename.focus()
		return;
	}

	if (getByteLength(thisForm.handlename.value) >24){
		alert('ハンドルネームは全角12文字以内で入力してください。');
		thisForm.handlename.focus()
		return;
	}

	if(specialCheck(thisForm.handlename.value)){
		alert("ハンドルネームに半角記号は入力できません。");
		return;
	}

	thisForm.target = "namech";
	thisForm.action = "/fanclub/check_handle.php";
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open('',"namech",'width=500,height=300,scrollbars=no,status=no,top=' + window_top + ',left=' + window_left + '');
	thisForm.submit();
}
//############## 회원가입시 아이디 중복체크 ####################


//############## 회원가입시 아이디 중복체크 후 발송 ####################
function send_re() { //check_userid.php
	var userid= eval(document.id_check.userid);

   if(!userid.value) {
      alert('IDを 入力してください。');
	  userid.focus();
	  return;
   }else {
	   if(!IsID('id_check',userid.name)) {
			alert("IDは4文字以上10文字以下、半角英数字で入力してください。");
			userid.focus();
			userid.select();
			return ;
	   }else{
		    document.id_check.submit()
	   }
   }
}


function form_send(s_id) {
 opener.document.frm.userid.value=s_id;
 opener.document.frm.userid_re.value=s_id;
 self.close();
}
//############## 회원가입시 아이디 중복체크 후 발송 ####################


//############## 회원가입시 핸들네임 중복체크 후 발송 ####################
function send_re_hn() {
	var handlename= eval(document.hn_check.handlename);

   if(!handlename.value) {
      alert('ハンドルネームを入力してください');
	  handlename.focus();
	  return;
   }else {
	   if(getByteLength(handlename.value) >24) {
		alert("ハンドルネームは全角12文字以内で入力してください。");
			handlename.focus();
			handlename.select();
			return ;
	   }else{
		    document.hn_check.submit()
	   }
   }
}


function form_send_hn(s_id) {
	opener.document.frm.handlename.value=s_id;
	opener.document.frm.handlename_re.value=s_id;
	self.close();
}
//############## 회원가입시 아이디 중복체크 후 발송 ####################



//############## 로그인 ################################################
function doLogin() {
	var thisForm = document.loginForm;

	if(thisForm.cardnum.value=="") {
		alert("会員番号（12桁数字）を入力してください。");
		thisForm.cardnum.focus();
		return false;
	}

	if(thisForm.userid.value=="") {
		alert("会員IDを入力してください。");
		thisForm.userid.focus();
		return false;
	}

	if(!IsID('loginForm',thisForm.userid.name)) {
		alert("会員IDは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userid.focus();
		thisForm.userid.select();
		return false ;
	}

	if(thisForm.userpwd.value=="") {
		alert("パスワードを入力してください。");
		thisForm.userpwd.focus();
		return false;
	}

	if(!IsPW('loginForm',thisForm.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userpwd.focus();
		thisForm.userpwd.select();
		return false;
	}

	return true;
}
//############## 로그인 ################################################



//############## 티켓 구매 ################################################
function doTicket() {
	var thisForm = document.ticketForm;
	checkpoint = false;
	for(i=0; i<thisForm.ticketsu.length; i++){
		if(thisForm.ticketsu[i].checked == true){
			checkpoint = true;
		}
	}
	if(checkpoint == false){
		alert("チケット枚数を確認してください。");
		return false;
	}
}
//############## 로그인 ################################################




//############## 티켓 구매 ################################################
function doTicket_multi() {
	var thisForm = document.ticketForm;
	checkpoint = false;
	for(i=0; i<ticketForm.ticketsu1.length; i++){
		if(ticketForm.ticketsu1[i].checked == true){
			checkpoint = true;
		}
	}
	for(i=0; i<ticketForm.ticketsu2.length; i++){
		if(ticketForm.ticketsu2[i].checked == true){
			checkpoint = true;
		}
	}
	for(i=0; i<ticketForm.ticketsu3.length; i++){
		if(ticketForm.ticketsu3[i].checked == true){
			checkpoint = true;
		}
	}
	for(i=0; i<ticketForm.ticketsu4.length; i++){
		if(ticketForm.ticketsu4[i].checked == true){
			checkpoint = true;
		}
	}

	if(checkpoint == false){
		alert("チケット枚数を確認してください。");
		return false;
	}
}


//############## 로그인 ################################################





//############## 티켓 선택 ################################################
function selTicket() {
	var thisForm = document.ticketForm;
	checkpoint = false;
	for(i=0; i<thisForm.whend.length; i++){
		if(thisForm.whend[i].checked == true){
			checkpoint = true;
		}
	}
	if(checkpoint == false){
		alert("check which kind of ticket, day or night?");
		return false;
	}
}
//############## 로그인 ################################################



//############## 로그인 카드번호 없는 경우 ################################################
function doLogin2() {
	var thisForm = document.loginForm;

	if(thisForm.userid.value=="") {
		alert("会員IDを入力してください。");
		thisForm.userid.focus();
		return false;
	}

	if(!IsID('loginForm',thisForm.userid.name)) {
		alert("会員IDは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userid.focus();
		thisForm.userid.select();
		return false ;
	}

	if(thisForm.userpwd.value=="") {
		alert("パスワードを入力してください。");
		thisForm.userpwd.focus();
		return false;
	}

	if(!IsPW('loginForm',thisForm.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userpwd.focus();
		thisForm.userpwd.select();
		return false;
	}

	return true;
}
//############## 로그인 ################################################


//############## 아이디 찾기 ################################################
function doSubmit() {
	var thisForm = document.frm;
	if(thisForm.handlename.value==""){
		alert('ハンドルネームを入力してください');
		thisForm.handlename.focus()
		return;
	}

	if (getByteLength(thisForm.handlename.value) >24){
		alert('ハンドルネームは全角12文字以内で入力してください。');
		thisForm.handlename.focus()
		return;
	}

	if(specialCheck(thisForm.handlename.value)){
		alert("ハンドルネームに半角記号は入力できません。");
		return;
	}

	if(isNaN(thisForm.birthday1.value)){
		alert('年度は半角数字で入力してください。');
		thisForm.birthday1.focus()
		return;
	}

	if(thisForm.birthday1.value==""||thisForm.birthday1.value.length<4){
		alert('生年月日を入力してください。');
		thisForm.birthday1.focus()
		return;
	}

	if(thisForm.birthday2.value==""){
		alert('生年月日を入力してください。');
		thisForm.birthday2.focus()
		return;
	}

	if(thisForm.birthday3.value==""){
		alert('生年月日を入力してください。');
		thisForm.birthday3.focus()
		return;
	}

	if(thisForm.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.email.focus()
		return;
	}

	if(!isEmail(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(emailCheck(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	
	thisForm.submit();

}
//############## 아이디 찾기 ################################################




//############## 패스워드 찾기 ################################################
function doPwdSubmit(){

	var thisForm = document.frm;
	if(!thisForm.userid.value){
		alert('IDを入力してください。');
		thisForm.userid.focus()
		return;
	}

	if(!IsID('frm',thisForm.userid.name)) {
		alert("IDは4文字以上10文字以下、半角英数字で入力してください。");
		thisForm.userid.focus();
		thisForm.userid.select();
		return ;
	}

	if(thisForm.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.email.focus()
		return;
	}

	if(!isEmail(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(emailCheck(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	thisForm.submit();

}
//############## 패스워드 찾기 ################################################



//############## 회원정보수정 ###########################################
function formGo_Modify(){
	var thisForm = document.frm;

	if(thisForm.realnm1.value==""){
		alert('名前を入力してください。');
		thisForm.realnm1.focus()
		return;
	}

	if(!junCheck(thisForm.realnm1)){
		alert('名前は全角で入力してください');
		thisForm.realnm1.focus()
		return;
	}

	if(thisForm.realnm2.value==""){
		alert('名前を入力してください。');
		thisForm.realnm2.focus()
		return;
	}

	if(!junCheck(thisForm.realnm2)){
		alert('名前は全角で入力してください');
		thisForm.realnm2.focus()
		return;
	}


	if(thisForm.kananm1.value==""){
		alert('フリガナを入力してください。');
		thisForm.kananm1.focus()
		return;
	}

	if(!kataCheck(thisForm.kananm1.value)){
		alert('フリガナは全角カタカナで入力してください。');
		thisForm.kananm1.focus()
		return;
	}


	if(thisForm.kananm2.value==""){
		alert('フリガナを入力してください。');
		thisForm.kananm2.focus()
		return;
	}

	if(!kataCheck(thisForm.kananm2.value)){
		alert('フリガナは全角カタカナで入力してください。');
		thisForm.kananm2.focus()
		return;
	}

	checkpoint1 = false;
	for(i=0; i<thisForm.gender.length; i++){
		if(thisForm.gender[i].checked == true){
			checkpoint1 = true;
		}
	}
	if(checkpoint1 == false){
		alert("性別を入力してください。");
		return;
	}

	if(thisForm.zip1.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip1.focus()
		return;
	}

	if(isNaN(thisForm.zip1.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip1.focus()
		return;
	}

	if(thisForm.zip2.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(isNaN(thisForm.zip2.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(thisForm.address.value==""){
		alert('地域を選択してください。');
		thisForm.address.focus()
		return;
	}
	
	if(thisForm.city.value==""){
		alert('市区町村を入力してください。');
		thisForm.city.focus()
		return;
	}

	if(thisForm.street1.value==""){
		alert('番地を入力してください。');
		thisForm.street1.focus()
		return;
	}

	if(thisForm.phone1.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(isNaN(thisForm.phone1.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(thisForm.phone2.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(isNaN(thisForm.phone2.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(thisForm.phone3.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone3.focus()
		return;
	}

	if(isNaN(thisForm.phone3.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone3.focus()
		return;
	}

	
 
	thisForm.action="login_process.php?mode=join_modify";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원정보 수정 ###########################################


//############## 회원패스 수정 ###########################################
function formGo_Pass(){
	var thisForm = document.frm;

	if(!thisForm.userpwd.value){
		alert('パスワードを入力してください。');
		thisForm.userpwd.focus()
		return;
	}

	if(!IsPW('frm',thisForm.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下,半角英数字で入力してください。");
		thisForm.userpwd.focus();
		thisForm.userpwd.select();
		return;
	}

	if(thisForm.userpwd_confirm.value!=thisForm.userpwd.value){
		alert('パスワードが一致しません。');
		thisForm.userpwd_confirm.focus()
		return;
	}

	thisForm.action="login_process.php?mode=join_pass";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원 패스 수정 ###########################################



//############## 윈도우 창 오픈(관리자, 회원정보보기) ###########################################
function open_win(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
//############## 윈도우 창 오픈(관리자, 회원정보보기) ###########################################



//############## php_admin/admin_mem_mail_list.php ###########################
function MM_openBrWindow(theURL,winName,features) { //v2.0
  winName = window.open(theURL,winName,features);
  winName.focus();
}


var checkflag = "false";
function checkAll() {
    var form = document.form1;
	if (checkflag == "false") {
		for (var j = 0; j < form.elements.length; j++) {
			if(form.elements[j].name == "num[]"){
					if(form.elements[j].checked == false)
						form.elements[j].checked = true;
					}
		    }
		checkflag="true";
	}
	else if (checkflag == "true"){
		for (var j = 0; j < form.elements.length; j++) {
			if(form.elements[j].name == "num[]"){
					if(form.elements[j].checked == true)
						form.elements[j].checked = false;
					}
		}
		checkflag="false";
	}
}

function mail_send(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=660,height=350,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "open_mem_mail_form.php";
	form.submit();
}


function form_send_mail(){
	form1.action = "admin_mem_mail_list.php";
	form1.target = "_self";
	document.form1.submit();
}


function form_send_modify(){
	form1.action = "arb_member_list.php";
	form1.target = "_self";
	document.form1.submit();
}

//#####################################################################




//######## csv 파일 만들기 스크립트############################################
function makefile(){
  var form = document.form1;
	/*if (form.oyear.value == ""){
		alert("Select start year!");
		form.oyear.focus();
		return;
	}
	
	if (form.omonth.value == ""){
		alert("Select start month!");
		form.omonth.focus();
		return;
	}

	if (form.oday.value == ""){
		alert("Select start day!");
		form.oday.focus();
		return;
	}*/
	if (form.topendate.value =="")
	{
		alert("Select start date!");
		form.topendate.focus();
		return;
	}

	if (form.tclosedate.value =="")
	{
		alert("Select End date!");
		form.tclosedate.focus();
		return;
	}

  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	//form.target = "msend";
	form.action = "making_csv.php";
	form.submit();
}
//#####################################################################




//############## php_admin/open_mem_mail_form.php ###########################
function send_check() {
	var form = document.mail;

	if(!form.subject.value){
		alert('タイトルを入力してください。');
		form.subject.focus();
		return;
	}

	if(!form.contents.value){
		alert('内容を入力してください。');
		form.contents.focus();
		return;
	}
	form.submit();
}
//############## php_admin/open_mem_mail_form.php ###########################



//############## php_admin/mail_form.php ###########################
function send_check_mail() {
	var form = document.mail;
	if(!form.sender.value){
		alert('check sender!');
		form.sender.focus();
		return;
	}

	if(!form.sender_email.value){
		alert('check sender email!');
		form.sender_email.focus();
		return;
	}

	if(!form.receiver.value){
		alert('check receiver name!');
		form.receiver.focus();
		return;
	}

	if(!form.receiver_email.value){
		alert('check receiver email!');
		form.receiver_email.focus();
		return;
	}

	if(!form.subject.value){
		alert('check title!');
		form.subject.focus();
		return;
	}

	if(!form.contents.value){
		alert('check content!');
		form.contents.focus();
		return;
	}
	form.submit();
}
//############## php_admin/mail_form.php ###########################

function IsID(realform,formname) {
     var form=eval("document."+realform+"."+formname);

     if(form.value.length < 4 || form.value.length > 10) {
         return false;
     }
     for(var i=0; i < form.value.length; i++) {
         var chr = form.value.substr(i,1);
         if((chr < '0' || chr > '9') && (chr < 'a' || chr > 'z')) {
            return false;
         }
     }
     return true;
}



//######################### 관리자 등록 #################################
function checkInput_Admin(){
   var form = document.frm;
	if(!form.userid.value) {
		alert("IDを入力してください。");
		form.userid.focus();
		return ;
	}
	if(!IsID('frm',form.userid.name)) {
		alert("IDは4文字以上10文字以下、半角英数字で入力してください。");
		form.userid.focus();
		form.userid.select();
		return ;
	}
	if(form.userid.value!=form.userid_re.value){
		alert('ID重複チェックをしてください');
		form.userid.focus()
		return;
	}
	
	if(form.handlename.value==""){
		alert('ハンドルネームを入力してください');
		form.handlename.focus()
		return;
	}
	if (getByteLength(form.handlename.value) >24){
		alert('ハンドルネームは全角12文字以内で入力してください。');
		form.handlename.focus()
		return;
	}
	/*if(specialCheck(form.handlename.value)){
		alert("ハンドルネームに半角記号は入力できません。");
		return;
	}*/
	if(!form.userpwd.value) {
		alert("パスワードを入力してください。");
		form.userpwd.focus();
		return ;
	}
	if(!IsPW('frm',form.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下,半角英数字で入力してください。");
		form.userpwd.focus();
		form.userpwd.select();
		return;
	}
	if(form.userpwd.value != form.userpwd_confirm.value) {
		alert("パスワードが一致しません。");
		form.userpwd_confirm.focus();
		form.userpwd_confirm.select();
		return;
	}
	if(form.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		form.email.focus()
		return;
	}
	if (!isEmail(form.email.value))
	{
		alert('メールアドレスを正しく入力してください。');
		form.email.focus();
		return;
	}
	if(emailCheck(form.email.value)){
		alert('メールアドレスを正しく入力してください。');
		form.email.focus()
		return;
	}
	if(!form.level.value) {
		alert("input Level!");
		form.level.focus();
		return;
	}
  form.submit();
}


//######################### 관리자 수정 #################################
function checkInput_admin_mo(){
   var form = document.frm1;
   
 
   if(form.handlename.value==""){
		alert('ハンドルネームを入力してください');
		form.handlename.focus()
		return;
	}
	if (getByteLength(form.handlename.value) >24){
		alert('ハンドルネームは全角12文字以内で入力してください。');
		form.handlename.focus()
		return;
	}
	/*if(specialCheck(form.handlename.value)){
		alert("ハンドルネームに半角記号は入力できません。");
		return;
	}
	if(!form.userpwd.value) {
		alert("パスワードを入力してください。");
		form.userpwd.focus();
		return ;
	}
	if(!IsPW('frm1',form.userpwd.name)) { //thisForm.userpwd.name => userpwd
		alert("パスワードは4文字以上10文字以下,半角英数字で入力してください。");
		form.userpwd.focus();
		form.userpwd.select();
		return;
	}*/
	if(form.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		form.email.focus()
		return;
	}
	if (!isEmail(form.email.value))
	{
		alert('有効なメールアドレスではありません。再入力してください。');
		form.email.focus();
		return;
	}
	if(emailCheck(form.email.value)){
		alert('有効なメールアドレスではありません。再入力してください。');
		form.email.focus()
		return;
	}
	if(!form.level.value) {
		alert("Levelを入力してください。!");
		form.level.focus();
		return;
	}

  form.submit();
  }



//############## 회원정보 수정(관리자에서) ###########################################
function AGo_Modify(){
	var thisForm = document.primary;

	if(thisForm.email.value.split(" ").join("") ==""){
		alert('メールアドレスを入力してください。');
		thisForm.email.focus()
		return;
	}

	if(!isEmail(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(emailCheck(thisForm.email.value)){
		alert('メールアドレスを正しく入力してください。');
		thisForm.email.focus()
		return;
	}

	if(thisForm.birthday.value==""){
		alert('誕生日を入力してください。');
		thisForm.birthday.focus()
		return;
	}

	if(thisForm.address.value==""){
		alert('地域を選択してください。');
		thisForm.address.focus()
		return;
	}

	if(thisForm.city.value==""){
		alert('地域を選択してください。');
		thisForm.city.focus()
		return;
	}

	if(thisForm.street1.value==""){
		alert('地域を選択してください。');
		thisForm.street1.focus()
		return;
	}

	if(thisForm.zip1.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip1.focus()
		return;
	}

	if(isNaN(thisForm.zip1.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip1.focus()
		return;
	}

	if(thisForm.zip2.value==""){
		alert('郵便番号を入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(isNaN(thisForm.zip2.value)){
		alert('郵便番号は半角数字で入力してください。');
		thisForm.zip2.focus()
		return;
	}

	if(thisForm.phone1.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(isNaN(thisForm.phone1.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone1.focus()
		return;
	}

	if(thisForm.phone2.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(isNaN(thisForm.phone2.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone2.focus()
		return;
	}

	if(thisForm.phone3.value==""){
		alert('電話番号を入力してください。');
		thisForm.phone3.focus()
		return;
	}

	if(isNaN(thisForm.phone3.value)){
		alert('電話番号は半角数字で入力してください。');
		thisForm.phone3.focus()
		return;
	}

	
	checkpoint = false;
	for(i=0; i<thisForm.hana_paper_flg.length; i++){
		if(thisForm.hana_paper_flg[i].checked == true){
			checkpoint = true;
		}
	}
	if(checkpoint == false){
		alert("メール通信を入力してください。");
		return;
	}

	if(thisForm.hana_level.value==""){
		alert('Levelを選択してください。');
		thisForm.hana_level.focus()
		return;
	}
 
	thisForm.action="mem_view_edit.php";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 회원정보 수정(관리자) ###########################################




//############## 티켓 회원정보 수정(관리자에서) ###########################################
function TGo_Modify(){
	var thisForm = document.primary;

	if(thisForm.ticketsu.value==""){
		alert('ticket numberを選択してください。');
		thisForm.ticketsu.focus()
		return;
	}

	checkpoint = false;
	for(i=0; i<thisForm.tickettype.length; i++){
		if(thisForm.tickettype[i].checked == true){
			checkpoint = true;
		}
	}
	if(checkpoint == false){
		alert("ticket typeを入力してください。");
		return;
	}
	
	thisForm.action="ticket_view_edit.php";
	thisForm.target = "_self";

	thisForm.submit();

}
//############## 티켓 회원정보 수정(관리자) ###########################################





//####################### 리스트에서 검색하기 ##########################
function content_check()
{
frm3 = document.searchform;
search = frm3.search.value.length;

if ( search < 2 ) {
	alert("検索するキーワードは２文字以上を入力してください。");
	frm3.search.focus();
	return ;
}

frm3.submit();
}
//####################### 리스트에서 검색하기 ##########################


//####################### 리스트에서 검색하기 ##########################
function content_check_enter()
{
frm3 = document.searchform;
search = frm3.search.value.length;

if ( search < 2 ) {
	alert("検索するキーワードは２文字以上を入力してください。");
	frm3.search.focus();
	return false;
}

frm3.submit();
}
//####################### 리스트에서 검색하기 ##########################


//####################### 게시판 글쓰기  ##########################
function check_write(f) {
	if(document.composeForm.ttitle.value<8) {
		alert('タイトルを入力してください。');
		document.composeForm.ttitle.focus();
		return ;
	}else if(document.composeForm.ttitle.value.length>30) {
		alert('タイトルは30文字以内で入力してください。');
		document.composeForm.ttitle.focus();
		return ;
	}else if(document.composeForm.icomment.value<2) {
		alert('内容を入力してください。');
		document.composeForm.icomment.focus();
		return ;
	}else{
		document.composeForm.submit();
		return true;
	}
}
//####################### 게시판 글쓰기  ##########################



//####################### 게시판 글쓰기  ##########################
function check_write_nomem(f) {
	if(document.composeForm.ttitle.value<8) {
		alert('タイトルを入力してください。');
		document.composeForm.ttitle.focus();
		return ;
	}else if(document.composeForm.ttitle.value.length>30) {
		alert('タイトルは30文字以内で入力してください。');
		document.composeForm.ttitle.focus();
		return ;
	}else if(document.composeForm.icomment.value<2) {
		alert('内容を入力してください。');
		document.composeForm.icomment.focus();
		return ;
	}else if(document.composeForm.input_key.value<2) {
		alert('認証コードを入力してください。');
		document.composeForm.input_key.focus();
		return ;
	}else if(document.composeForm.tname.value == "") {
		alert('名前を入力してください。');
		document.composeForm.tname.focus();
		return ;
	}else if(!IsPW('composeForm',document.composeForm.userpass.name)) {
		alert("パスワードは4文字以上10文字以下、半角英数字で入力してください。");
		document.composeForm.userpass.focus();
		return ;
	}else{
		document.composeForm.submit();
		return true;
	}
}
//####################### 게시판 글쓰기  ##########################





//####################### 게시판 comment 글자수 제한  ##########################
function length_count(filed, max_count){ 
var str; 
var str_count = 0; 
var cut_count = 0; 
var str_length = filed.value.length; 

for(k=0; k < str_length; k++){ 
str = filed.value.charAt(k); 
    if(escape(str).length > 4){ 
    str_count += 2; 
    }else{ 
    // (\r\n은 1byte 처리) 
        if(escape(str)=='%0A') { 
        } else { 
        str_count++; 
        } 
    } 
    if(max_count < str_count){ 
    alert("文字は"+ max_count +" バイトを超えています。"); 
    if(escape(str).length > 4) str_count -= 2; 
    else str_count--; 
    filed.value = filed.value.substring(0,k); 
    break; 
    } 
} 
eval("document.all."+ filed.name+"_count.innerHTML = str_count;"); 
} 
//####################### 게시판 comment 글자수 제한  ##########################




//####################### 게시판 글 삭제 스크립트  ##########################
function delete_board(){
	if(!confirm("削除しますか?"))
	{
		return;
	}
	document.deleteform.submit();	
}
//####################### 게시판 글 삭제 스크립트  ##########################




//####################### 게시판 코멘트 입력체크 스크립트  ##########################
function content_cm_check(form){
mcomment = cmform.mcomment.value.length;
if ( mcomment == 0 ) {
	alert("内容を入力してください。");
	cmform.mcomment.focus();
	return (false);
}
return (true);
}
//####################### 게시판 코멘트 입력체크 스크립트  ##########################




//####################### 관리자 체크후 전체삭제 스크립트  ##########################
function form_delete(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "open_mem_delete_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체삭제 스크립트  ##########################





//####################### 관리자 체크후 전체레벨업 스크립트  ##########################
function form_levelup(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "open_mem_levelup_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체레벨업 스크립트  ##########################




//####################### 관리자 체크후 전체레벨업 스크립트  ##########################
function form_liston(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "../mem/open_mem_liston_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체레벨업 스크립트  ##########################



//####################### 관리자 체크후 전체삭제 스크립트  ##########################
function form_list_delete(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "../mem/open_list_delete_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체삭제 스크립트  ##########################




//####################### 관리자 체크후 전체삭제 스크립트  ##########################
function delete_file(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "open_csv_delete_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체삭제 스크립트  ##########################




//####################### 관리자 체크후 전체 배송 스크립트  ##########################
function form_delivery(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "open_mem_delivery_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체 배송 스크립트  ##########################




//####################### 우편번호 찾기 스크립트  ##########################
function ZipWindow(ref,what) {
     var window_left = (screen.width-640)/2;
	 var window_top = (screen.height-480)/2;
	 ref = ref + "?what=" + what;
	 window.open(ref,"zipWin",'width=500,height=300,status=no,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
  }
//####################### 우편번호 찾기 스크립트  ##########################





//####################### 우편번호 찾기 스크립트  ##########################
function checkInput(form){
   var form = document.zipsearch;
   if(!form.zip1.value) {
        alert("郵便番号を入力してください。");
        form.zip1.focus();
	    return ;
   }

   if(!form.zip2.value) {
        alert("郵便番号を入力してください。");
        form.zip2.focus();
	    return ;
   }
   
   form.submit();
}

function open_move(zip1,zip2,zip7,zip8,what) {
  if(what == 1){ 
   var form_object = eval("opener.document.frm");
  }else{
   var form_object = eval("opener.document.primary");
  }
      form_object.zip1.value = zip1;
      form_object.zip2.value = zip2;
      form_object.address.value = zip7;
      form_object.city.value = zip8;
	  form_object.street1.focus();
   
      self.close();
}
//####################### 우편번호 찾기 스크립트  ##########################

//####################### 관리자 체크후 전체 티켓컨펌 스크립트  ##########################
function form_ticket_confirm(){
  var form = document.form1;
  var no_count = 0;
	for(i=0; i < form.elements.length; i++){
		if(form.elements[i].name == "num[]"){
			if(form.elements[i].checked == true){
				no_count++;
			}
		}
	}

	if(no_count == 0){
		alert('select item!');
		return;
	}
	MM_openBrWindow('','msend','width=360,height=200,resizable=yes,top=50,left=50');

	form.target = "msend";
	form.action = "open_mem_ticket_form.php";
	form.submit();
}
//####################### 관리자 체크후 전체 티켓컨펌 스크립트  ##########################











//############## 회원가입1 ###########################################
function formGo_FR(){
	var thisForm = document.frm;

	if(thisForm.femail.value.split(" ").join("") ==""){
		alert('please, write email address');
		thisForm.femail.focus()
		return;
	}

	if(!isEmail(thisForm.femail.value)){
		alert('email address is wrong, please check your mail account');
		thisForm.femail.focus()
		return;
	}

	if(emailCheck(thisForm.femail.value)){
		alert('email address is wrong, please check your mail account');
		thisForm.femail.focus()
		return;
	}

	if(thisForm.fname1.value==""){
		alert('please, write family name');
		thisForm.fname1.focus()
		return;
	}

	if(!engNumCheck(thisForm.fname1)){
		alert('please, check family name, it only can be used in english and number');
		thisForm.fname1.focus()
		return;
	}

	if(thisForm.fname2.value==""){
		alert('please, write your name');
		thisForm.fname2.focus()
		return;
	}

	if(!engNumCheck(thisForm.fname2)){
		alert('please, check family name, it only can be used in english and number');
		thisForm.fname2.focus()
		return;
	}

	if(thisForm.fage.value==""){
		alert('please, write your age');
		thisForm.fage.focus()
		return;
	}

	if(isNaN(thisForm.fage.value)){
		alert('please, check your age, it only can be used in number');
		thisForm.fage.focus()
		return;
	}

	if(thisForm.fnationality.value==""){
		alert('please, write your nationality');
		thisForm.fnationality.focus()
		return;
	}

	if(!engNumCheck(thisForm.fnationality)){
		alert('please, check nationality, it only can be used in english and number');
		thisForm.fnationality.focus()
		return;
	}

	if(thisForm.flanguage.value==""){
		alert('please, write your language');
		thisForm.flanguage.focus()
		return;
	}

	if(!engNumCheck(thisForm.flanguage)){
		alert('please, check language name, it only can be used in english and number');
		thisForm.flanguage.focus()
		return;
	}

	if(thisForm.fcountry.value==""){
		alert('please, write your residential country');
		thisForm.fcountry.focus()
		return;
	}

	if(!engNumCheck(thisForm.fcountry)){
		alert('please, check residential country, it only can be used in english and number');
		thisForm.fcountry.focus()
		return;
	}

	if(thisForm.ftype.value==""){
		alert('please, write your ticket type');
		thisForm.ftype.focus()
		return;
	}

	
	thisForm.action="regist_process.php?mode=join";
	thisForm.target = "_self";

	thisForm.submit();

}



function engNumCheck(msg){
	msg = msg.toLowerCase();
	var checkword = "abcdefghijklmnopqrstuvwxyz0123456789";
	for(i=0;i<msg.length;i++){
		if(checkword.indexOf(msg.substring(i,i+1))==-1)return true;
	}
	return false;
}



//############## 회원가입1 ###########################################


//-->

