
	function memberInput(){
		form = document.frm1;
		form.action = "registration_exe.asp"

		if (!checkNull(form.m_id, "ID"))
			return ;
		if (form.m_id.value.length<4 || form.m_id.value.length>64){
			alert('The ID inputs below 64 letters above 4 letters and it does.');
			form.m_id.focus();
			return;
		}
		if (form.check_id.value=="N"){
			alert("The ID do as a favor the duplication confirmation.");
			form.m_id.focus();
			return;
		}
		
		form.m_pwd.value = form.m_pwd.value.toLowerCase();
		form.m_pwd2.value = form.m_pwd2.value.toLowerCase();
		if (!checkPass(form.m_pwd.value, form.m_pwd2.value, form)){
			form.m_pwd.focus();
			return ;
		}	

		if (!checkNull(form.m_ename, "your first name"))
			return ;

		if (!checkNull(form.m_name, "your last name"))
			return ;

		memberCommon(form);
	}

	function memberModify(){
		form = document.frm1;
		form.action = "mypage_exe.asp"

		if (form.m_pwd.value!="" || form.m_pwd2.value!=""){
			form.m_pwd.value = form.m_pwd.value.toLowerCase();
			form.m_pwd2.value = form.m_pwd2.value.toLowerCase();
			if (!checkPass(form.m_pwd.value, form.m_pwd2.value, form)){
				form.m_pwd.focus();
				return ;
			}
		}

		memberCommon(form);
	}

	function memberCommon(form){

		if (!checkNull(form.m_email, "your e-mail"))
			return ;

		if (!checkNull(form.m_tel, "your telephone"))
			return ;	

		if (!checkNull(form.m_part4, "your company name"))
			return ;	

		if (form.m_part4.value=="ZZB0060012"){
			if (!checkNull(form.m_part4etc, "your company name"))
			return ;	
		}

		if (!checkNull(form.m_post, "your position"))
			return ;		

		if (!checkNull(form.m_addr, "your company address"))
			return ;	

		if (!checkNull(form.m_part2, "your company country"))
			return ;		

		if (form.m_part2.value=="ZZA0060012"){
			if (!checkNull(form.m_part2etc, "your company country"))
			return ;	
		}		

		if (!checkNull(form.m_comtel, "your company phone"))
			return ;	

		form.submit();
			
	}

	function checkPass(pass1, pass2, form)	{
		if (pass1.length == 0 || pass2.length == 0)		{
			alert("The password was not input.");
			return false;
		}

		if (pass1 != pass2)		{
			alert("The password does not agree.");
			return false;
		}

		if (pass1.length < 4 || pass1.length > 12)		{
			alert("The password uses below 12 letters above 4 letters and it does.");
			return false;
		}

		if (!isValid_Char(pass1))		{
			alert("The password only number and English use is possible.");
			return false;
		}
			
		return true;
	}
	
	function chk_exist_id(form){
		new_win('/member/idcheck_pop.asp','idcheck','300','180','0');
	}

	function chk_post(){
		new_win('/member/zipcode.asp?form=frm1&zkey=m_zipkey&zip1=m_zip1&zip2=m_zip2&zaddr1=m_addr1','zipcode','481','400','1');
	}


	function changePart(pn) {
		form = document.frm1;

		var param = "&p1=" + form.m_part1.value + "&pn=" + pn;		
		var str = DoCallBack("/member/part.asp", param);
		var rows = str.responseText.split("\r\n");

		if(form.m_part3.value=="PRT0040001"){
			form.m_part4.options[0].selected=true;
			document.getElementById("part3").style.display="";
			document.getElementById("part4").style.display="none";
		} else{
			form.m_part3etc.value="";
			document.getElementById("part3").style.display="none";

			if(form.m_part3.value=="PRT0010001"){
				document.getElementById("part4").style.display="";
			} else{
				form.m_part4.options[0].selected=true;
				document.getElementById("part4").style.display="none";
			}
		}

					
		if (pn=="1"){	
			var m = 1;
			var n = 1;

			for(i=form.m_part2.length-1; i>0 ;i--)	{
				form.m_part2.options[i] = null;
			}
			for(i=form.m_part4.length-1; i>0 ;i--)	{
				form.m_part4.options[i] = null;
			}

			for(i=0; i<rows.length; i++){
				cols = rows[i].split("\t");
				if(cols[0]=="part2" && cols[1]!=""){					
					form.m_part2[m] = new Option(cols[2], cols[1]);
					m++;
				}
				if(cols[0]=="part4" && cols[1]!=""){					
					form.m_part4[n] = new Option(cols[2], cols[1]);
					n++;
				}
			}
		}
	}

    function checkMailDomain(obj){
        var obj1 = document.getElementById("m_emaildomain");
        obj1.value = obj[obj.selectedIndex].text;
        if (obj.selectedIndex==0){
            obj1.value = "";
        }
        if (obj.value == "etc"){
            obj1.style.display = "";
            obj1.value = "";
            obj1.focus();
        } else {
            obj1.style.display = "none";
        }
    }

	function chgPart2(str){
		if (str=="ZZA0060012"){
			document.getElementById("div_part2").style.display = "";
		} else{
			document.getElementById("div_part2").style.display = "none";
			frm1.m_part2etc.value = "";
		}
	}

	function chgPart4(str){
		if (str=="ZZB0060012"){
			document.getElementById("div_part4").style.display = "";
		} else{
			document.getElementById("div_part4").style.display = "none";
			frm1.m_part4etc.value = "";
		}
	}