
	// ----- Con_change_mobile()
	// - 
	function Con_change_mobile()
	{
	}

	function inputBoxCheckNum(inputBox)
	{
		if(ChkSpace(inputBox.value))
		{
			alert("有空白文字，请重新确认");
			inputBox.value = '';
			inputBox.focus();
			return;
		}

		if(isNaN(inputBox.value))
		{
			alert("只允许输入数字，请重新确认");
			inputBox.value = "";
			inputBox.focus();
			return;
		}
		if(inputBox.value.length == 4)
		{
			if(!isNaN(inputBox.value))
			{
				if(inputBox.name == "mobileMiddle")
					document.regForm.mobileRear.focus();
				else
					document.regForm.emailAccount.focus();

				return;
			}
			else
			{
				alert("手机号码只允许输入数字");
				inputBox.value = '';
				inputBox.focus();
				return;
			}
		}
	}

	function checkEmailHost_tuka(inputBox)
	{

		if(!ChkMail(inputBox.value))
		{
			alert("手机邮件地址里不允许包括的信息， 请重新确认");
			inputBox.value = '';
			inputBox.focus();
			return;
		}

		if(ChkSpace(inputBox.value))
		{
			alert("有空白文字，请重新确认");
			inputBox.value = '';
			return;
		}

		if(ChkHan(inputBox.value))
		{
			alert("手机邮件地址不支持韩文. 请重新确认");
			inputBox.value = "";
			return;
		}
	}
	


	function inputBoxCheckHan(inputBox)
	{
		if(ChkHan(inputBox.value))
		{
			alert("手机邮件地址不支持韩文. 请重新确认");
			document.regForm.emailAccount.value = "";
			document.regForm.emailAccount.focus();
		}
	}

	function Con_change_emailHost(selectBox)
	{
		if(selectBox.value == "no")
		{
			alert("请选择手机邮件地址");
			selectBox.focus();
			return;
		}
		else
			document.regForm.submit_.focus();
	}

	function Con_change_company(selectBox)
	{
		show_opt(selectBox, "change");
	}

	function Con_show_company(selectBox)
	{
		select_2.style.display = 'none';
		select_3.style.display = 'inline';
	}


	function show_opt(selectBox, op)
	{
		if(selectBox == null)
			return;

		if(op.value = 'change')
		{
			if(selectBox.value == "docomo")
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'inline';
				 teg_2.style.display = 'none';
				 teg_3.style.display = 'none';
				 teg_4.style.display = 'none';
				 teg_5.style.display = 'none';
				 teg_6.style.display = 'none';
				 teg_7.style.display = 'none';
			}
			else if(selectBox.value == "kddi")
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'none';
				 teg_2.style.display = 'inline';
				 teg_3.style.display = 'none';
				 teg_4.style.display = 'none';
				 teg_5.style.display = 'none';
				 teg_6.style.display = 'none';
				 teg_7.style.display = 'none';
			}
			else if(selectBox.value == "softbank")
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'none';
				 teg_2.style.display = 'none';
				 teg_3.style.display = 'inline';
				 teg_4.style.display = 'none';
				 teg_5.style.display = 'none';
				 teg_6.style.display = 'none';
				 teg_7.style.display = 'none';
			}
			else if(selectBox.value == "wilcom")
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'none';
				 teg_2.style.display = 'none';
				 teg_3.style.display = 'none';
				 teg_4.style.display = 'inline';
				 teg_5.style.display = 'none';
				 teg_6.style.display = 'none';
				 teg_7.style.display = 'none';
			}
			else if(selectBox.value == "astel")
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'none';
				 teg_2.style.display = 'none';
				 teg_3.style.display = 'none';
				 teg_4.style.display = 'none';
				 teg_5.style.display = 'inline';
				 teg_6.style.display = 'none';
				 teg_7.style.display = 'none';
			}
			else if(selectBox.value == "etc")
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'none';
				 teg_2.style.display = 'none';
				 teg_3.style.display = 'none';
				 teg_4.style.display = 'none';
				 teg_5.style.display = 'none';
				 teg_6.style.display = 'inline';
				 teg_7.style.display = 'none';
			}
			else
			{
				 teg_0.style.display = 'none';
				 teg_1.style.display = 'none';
				 teg_2.style.display = 'none';
				 teg_3.style.display = 'none';
				 teg_4.style.display = 'none';
				 teg_5.style.display = 'none';
				 teg_6.style.display = 'none';
				 teg_7.style.display = 'inline';
			}
				 emailHostFormReset();
		}
		else
		{
			 emailHostFormReset();
			 document.regForm.mobileFront.selectedIndex = 0;
			 selectBox.selectedIndex = 0;
		}

	 }

	 
	 function emailHostFormReset()
	 {
		document.regForm.emailHost_00.selectedIndex = 0;
		document.regForm.emailHost_01.selectedIndex = 0;
		document.regForm.emailHost_02.selectedIndex = 0;
		document.regForm.emailHost_03.selectedIndex = 0;
		document.regForm.emailHost_04.selectedIndex = 0;
		document.regForm.emailHost_05.selectedIndex = 0;
		document.regForm.emailHost_06.selectedIndex = 0;
		document.regForm.emailHost_07.value = "";
	 }

	 function companyFormReset(selectBox)
	 {
		if(selectBox.value != "no")
		 {
			select_0.style.display = 'inline';
			document.regForm.mobileFront.selectedIndex = 0;
			selectBox.selectedIndex = 0;
		 }
	 }


	//이메일체크/////////////////////////////////////////
	function ChkMail(emailAcount)
	{
		var regExp = /^((\w|[\-\.])+)$/;

		if ((emailAcount.search(regExp) == -1))
		{
			return false;
		}else
		{ 
			return true;
		}
	}


	//공백체크////////////////////////////////////////////////////
	function ChkSpace(strValue)
	{
		if (strValue.indexOf(" ")>=0)
		{
			return true;
		}else
		{
			return false;
		}
	}

	//한글체크////////////////////////////////////////////////////
	function ChkHan(strValue)
	{
		for(i=0;i < strValue.length; i++)
		{
			var a=strValue.charCodeAt(i);

			if(a > 128)
			{
				return true;
			}
		}

		return false;
	}

	function regFormCheck()
	{
		var formObj = document.reg_member;
		
		if(formObj.name.value == "")
		{
			alert("请输入名字");
			formObj.name.focus();
		}

		else if(formObj.phone_prefix.options[formObj.phone_prefix.selectedIndex].value == "no")
		{
			alert("请输入手机号码");
			formObj.phone_prefix.focus();
		}

		else if(formObj.phone_front.value == "")
		{
			alert("请选择手机号码的前几位");
			formObj.phone_front.focus();
		}

		else if(isNaN(formObj.phone_front.value))
		{
			alert("手机号码只允许输入数字");
			formObj.phone_front.value = '';
			formObj.phone_front.focus();
		}


		else if(formObj.phone_rear.value == "")
		{
			alert("手机尾数是四位，请重新确认");
			formObj.phone_rear.focus();
		}

		else if(isNaN(formObj.phone_rear.value))
		{
			alert("手机号码只允许输入数字");
			formObj.phone_rear.value = '';
			formObj.phone_rear.focus();
		}
		else
		{
			formObj.submit();
		}

		return false;


	}

	function formCheck(lang)
	{
		
		if(!isMobileFrontSelect())
		{
			alert("请选择手机号码的前几位");
			if(!(document.regForm.mobileFront_00.options[document.regForm.mobileFront_00.selectedIndex].value == "no"))
				document.regForm.mobileFront_00.focus();
			if(!(document.regForm.mobileFront_01.options[document.regForm.mobileFront_01.selectedIndex].value == "no"))
				document.regForm.mobileFront_01.focus();
			
		}

		else if(document.regForm.mobileMiddle.value.length > 4 || document.regForm.mobileMiddle.value.length < 3)
		{
			alert("手机号码是3~4位，请重新确认");
			document.regForm.mobileMiddle.focus();
		}

		else if(isNaN(document.regForm.mobileMiddle.value))
		{
			alert("手机号码只允许输入数字");
			document.regForm.mobileMiddle.value = '';
			document.regForm.mobileMiddle.focus();
		}

		else if(document.regForm.mobileRear.value.length != 4)
		{
			alert("手机尾数是四位，请重新确认");
			document.regForm.mobileRear.focus();
		}

		else if(isNaN(document.regForm.mobileRear.value))
		{
			alert("手机号码只允许输入数字");
			document.regForm.mobileRear.value = '';
			document.regForm.mobileRear.focus();
		}


		else if(!isCompanySelect())
		{
			alert("请选择相关日本通讯公司");
		}

		else if(document.regForm.emailAccount.value == "")
		{
			alert("请输入手机邮件地址");
			document.regForm.emailAccount.focus();
		}

		else if(ChkSpace(document.regForm.emailAccount.value))
		{
			alert("手机邮件地址存在空白. 请重新确认");
			document.regForm.emailAccount.focus();
		}

		else if(ChkHan(document.regForm.emailAccount.value))
		{
			alert("手机邮件地址不支持韩文. 请重新确认");
			document.regForm.emailAccount.value = "";
			document.regForm.emailAccount.focus();
		}

		else if(!ChkMail(document.regForm.emailAccount.value))
		{
			alert("手机邮件地址有误. 请重新确认");
			document.regForm.emailAccount.focus();
		}
		
		else if(!isEmailHostSelect())
		{
			alert("请选择手机邮件地址");
		}
		else
		{
			var p = getMobileFrontSelect() +
			document.regForm.mobileMiddle.value +
			document.regForm.mobileRear.value;

			var e = document.regForm.emailAccount.value + "@" + getEmailHostSelect();
			window.open('http://cn.ieffy.com/jingte_reg/cn/member_confirm.php?p=' + p + '&e=' + e + '&l=' + lang, '', 'width=500,height=342,menubar=0'); 
		}
								
		return false;

	}

	function isMobileFrontSelect()
	{
	
		if(!(document.regForm.mobileFront_00.options[document.regForm.mobileFront_00.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.mobileFront_01.options[document.regForm.mobileFront_01.selectedIndex].value == "no"))
			return true;
		
		return false;
	}

	function getMobileFrontSelect()
	{
		if(!(document.regForm.mobileFront_00.options[document.regForm.mobileFront_00.selectedIndex].value == "no"))
			return document.regForm.mobileFront_00.options[document.regForm.mobileFront_00.selectedIndex].value;

		if(!(document.regForm.mobileFront_01.options[document.regForm.mobileFront_01.selectedIndex].value == "no"))
			return document.regForm.mobileFront_01.options[document.regForm.mobileFront_01.selectedIndex].value;

	}

	function setMobileFrontSelectNo()
	{	
		if(select_0.style.display == "inline")
		{
			if(document.regForm.mobileFront_00.options[document.regForm.mobileFront_00.selectedIndex].value == "no")
			{
				select_0.style.display = "none";
				select_1.style.display = "inline";
			}
		}
		else
		{
			if(document.regForm.mobileFront_01.options[document.regForm.mobileFront_01.selectedIndex].value == "no")
			{
				select_0.style.display = "inline";
				select_1.style.display = "none";
			}
		}
		
		return;
	}

	function isCompanySelect()
	{
	
		if(!(document.regForm.company_00.options[document.regForm.company_00.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.company_01.options[document.regForm.company_01.selectedIndex].value == "no"))
			return true;
		
		return false;
	}

	function getCompanySelect()
	{
		if(!(document.regForm.company_00.options[document.regForm.company_00.selectedIndex].value == "no"))
			return document.regForm.company_00.options[document.regForm.company_00.selectedIndex].value;

		if(!(document.regForm.mobileFront_01.options[document.regForm.mobileFront_01.selectedIndex].value == "no"))
			return document.regForm.company_01.options[document.regForm.company_01.selectedIndex].value;

	}

	function setCompanySelectNo()
	{
		if(document.regForm.company_00.options[document.regForm.company_00.selectedIndex].value == "no")
		{
			select_company_0.style.display = "inline";
			select_company_1.style.display = "none";
		}

		if(document.regForm.company_01.options[document.regForm.company_01.selectedIndex].value == "no")
		{
			select_company_0.style.display = "none";
			select_company_1.style.display = "inline";
		}

		document.regForm.company_00.selectedIndex = 0;
		document.regForm.company_01.selectedIndex = 0;

		Con_change_company(document.regForm.company_00);
		Con_change_company(document.regForm.company_01);

		return;
	}

	function isEmailHostSelect()
	{
	
		if(!(document.regForm.emailHost_00.options[document.regForm.emailHost_00.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_01.options[document.regForm.emailHost_01.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_02.options[document.regForm.emailHost_02.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_03.options[document.regForm.emailHost_03.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_04.options[document.regForm.emailHost_04.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_05.options[document.regForm.emailHost_05.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_06.options[document.regForm.emailHost_06.selectedIndex].value == "no"))
			return true;
		if(!(document.regForm.emailHost_07.value == ""))
			return true;
		
		return false;
	}

	function getEmailHostSelect()
	{
		if(!(document.regForm.emailHost_01.options[document.regForm.emailHost_01.selectedIndex].value == "no"))
			return document.regForm.emailHost_01.options[document.regForm.emailHost_01.selectedIndex].value;

		if(!(document.regForm.emailHost_02.options[document.regForm.emailHost_02.selectedIndex].value == "no"))
			return document.regForm.emailHost_02.options[document.regForm.emailHost_02.selectedIndex].value;

		if(!(document.regForm.emailHost_03.options[document.regForm.emailHost_03.selectedIndex].value == "no"))
			return document.regForm.emailHost_03.options[document.regForm.emailHost_03.selectedIndex].value;

		if(!(document.regForm.emailHost_04.options[document.regForm.emailHost_04.selectedIndex].value == "no"))
			return document.regForm.emailHost_04.options[document.regForm.emailHost_04.selectedIndex].value;

		if(!(document.regForm.emailHost_05.options[document.regForm.emailHost_05.selectedIndex].value == "no"))
			return document.regForm.emailHost_05.options[document.regForm.emailHost_05.selectedIndex].value;

		if(!(document.regForm.emailHost_06.options[document.regForm.emailHost_06.selectedIndex].value == "no"))
			return document.regForm.emailHost_06.options[document.regForm.emailHost_06.selectedIndex].value;

		if(!(document.regForm.emailHost_07.value == ""))
			return document.regForm.emailHost_07.value;
	}

	function iframe_resize()
	{
		//alert('iframe_resize');
		//self.resizeTo(document.body.scrollWidth,document.body.scrollHeight);
		//self.resizeTo(document.body.scrollWidth,219);
		this.window.resizeTo(document.body.scrollWidth,219);
	}

	function popup_resize(win)
	{
		self.resizeTo(2,2);
		self.resizeTo(500,document.body.scrollHeight);
		
		// 새창의 크기와 위치 재설정
			 
		  // 
		  // 새창의 진행상황 체크 완료되면 코드실행 
		  // 
		  while(win.document.readyState != 'complete'){}
		   
		  var winBody = win.document.body; 
		  
		  // 
		  // 새창의 사이즈에 더해줄 marginWidth와 marginHeight 
		  // 
		  var marginHeight = parseInt(winBody.topMargin)+ parseInt(winBody.bottomMargin) ; 
		  var marginWidth = parseInt(winBody.leftMargin)+parseInt(winBody.rightMargin); 

		  //alert('topMargin : ' + parseInt(winBody.topMargin) + '       bottomMargin : ' + parseInt(winBody.bottomMargin));
		  // 
		  // 새창의 사이즈 설정 
		  // 
		  var wid = winBody.scrollWidth + (winBody.offsetWidth - winBody.clientWidth) + marginWidth; 
		  var hei = winBody.scrollHeight + (winBody.offsetHeight - winBody.clientHeight) + marginHeight+17; 
		  // 
		  // 사이즈 재조정 
		  // 
		  win.resizeTo(wid - 1, hei + 22); 

		  winCentre();
		  
	}

	function winCentre()
	{
		if (document.layers)
		{
			var sinist = screen.width / 2 - outerWidth / 2;
			var toppo = screen.height / 2 - outerHeight / 2;
		} 
		else
		{
			var sinist = screen.width / 2 - document.body.offsetWidth / 2;
			var toppo = -75 + screen.height / 2 - document.body.offsetHeight / 2;
		}

			self.moveTo(sinist, toppo);
	}

	function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}