/*** function port_change() ------------------------------------------------------------------- */
	function port_change(item){
	if ( item.options[item.selectedIndex].value.length < 1) {  return }
	var form=document.register ;
	var dest_item=item.options[item.selectedIndex].value;     
	parent.hidden.location='/servlet/lctE051.lctE051h?p_nato_code='+dest_item;
	}
	
	
/**** function back_order() ---------------------------------------------------------------*/
	function back_order(){
      window.location='/popup/register.html';
  }
	
/***function*******************************************************************************/
function register_Reset() {
    form = document.register;

    if ( !confirm(js_NoMsg(517,"","","")) )   return;
    
  	form.reset();
}

/***function*******************************************************************************/
function country_Check(){
  form = document.register;
	 var chk_cnt = 0;
	
	if(form.p_nato_code.options[form.p_nato_code.selectedIndex].value == ''){
    alert('Choose Country!!!');
    form.p_nato_code.focus();
    return;
  }

/* nato_code¿¡ µû¸¥ nato_nameÀ» °¡Á® ¿À±â À§ÇØ¼­ ¼³Á¤ÇØÁÜ---------------------------------*/
	if(form.p_nato_code.options[form.p_nato_code.selectedIndex].value != ''){
	  form.p_nato_name.value = form.p_nato_code.options[form.p_nato_code.selectedIndex].text;
	}
	
  if(form.p_jisa_code.options[form.p_jisa_code.selectedIndex].value == ''){
		alert('Choose the RBU!!!');
		form.p_jisa_code.focus();
    return;
  }

/* jisa_code¿¡ µû¸¥ jisa_nameÀ» °¡Á® ¿À±â À§ÇØ¼­ ¼³Á¤ÇØÁÜ---------------------------------*/
	if(form.p_jisa_code.options[form.p_jisa_code.selectedIndex].value != ''){
	  form.p_jisa_name.value = form.p_jisa_code.options[form.p_jisa_code.selectedIndex].text;
	}
	

  if(form.p_call.value == ''){
 		alert('Choose the Call!!!');
		form.p_call.focus();
    return;
  }
  
  if(form.p_job.value == ''){
 		alert('Choose the Job!!!');
		form.p_job.focus();
    return;
  }
	
	if(form.p_first_name.value == ''){
	  alert('Insert a First Name!!!');
		form.p_first_name.focus();
		return;
	}
	
	if(form.p_family_name.value == ''){
	  alert('Insert a Family Name!!!');
	  form.p_family_name.focus();
		return;
	}
	
	//±¹°¡ÄÚµå ÀÚµ¿À¸·Î µé¾î°¥¶© ¾î¶»°Ô ÇØ¾ßÇÒÁö...???
	if(form.p_first.value == ''){
	  alert('Insert a Country Code!!!');
	  form.p_first.focus();
		return;
	}
	if(isNumber(form.p_first) == false){	//¼ýÀÚ¸¸ µé¾î°¥ ¼ö ÀÖ°Ô
		alert('The Country Code is incorrect!!!');			//isNumber´Â string.js¿¡ ÀÖÀ½
		form.p_first.focus();
		return;
	}
	
	if(form.p_mid.value == ''){
	  alert('Insert an Area Code!!!');
	  form.p_mid.focus();
		return;
	}
	if(isNumber(form.p_mid) == false){	//¼ýÀÚ¸¸ µé¾î°¥ ¼ö ÀÖ°Ô
		alert('The Area Code is incorrect!!!');			//isNumber´Â string.js¿¡ ÀÖÀ½
		form.p_mid.focus();
		return;
	}
	
	if(form.p_last.value == ''){
	  alert('Insert an Office Phone Number!!!');
	  form.p_last.focus();
		return;
	}
	if(isNumber(form.p_last) == false){	//¼ýÀÚ¸¸ µé¾î°¥ ¼ö ÀÖ°Ô
		alert('The Office Phone Number is incorrect!!!');			//isNumber´Â string.js¿¡ ÀÖÀ½
		form.p_last.focus();
		return;
	}
	
	
	/*if(form.p_mobile_no.value == ''){
	  alert('Insert a Mobile Phone Number!!!');
	  form.p_mobile_no.focus();
		return;
	}*/
	
	if(isNumber(form.p_mobile_no) == false){	//¼ýÀÚ¸¸ µé¾î°¥ ¼ö ÀÖ°Ô
		alert('The Mobile Phone Number is incorrect!!!');			//isNumber´Â string.js¿¡ ÀÖÀ½
		form.p_mid.focus();
		return;
	}

	if(form.p_e_mail.value == ''){
	  alert('Insert an E-mail Address!!!');
	  form.p_e_mail.focus();
	  return;
	}
	///////  Àß¸øµÈ e-mail Çü½ÄÀ» ³Ö¾úÀ» ¶§ÀÇ Ã³¸®  ///////////
	if(isEmail(form.p_e_mail) == false){	// isEmailÀº common.js¿¡ ÀÖÀ½
		alert('The E-mail Address is incorrect!!!');
		form.p_e_mail.focus();
		return;
	}

	if(isNumber(form.p_area_code) == false){	//¼ýÀÚ¸¸ µé¾î°¥ ¼ö ÀÖ°Ô
		alert('The Area Code is incorrect!!!');			//isNumber´Â string.js¿¡ ÀÖÀ½
		form.p_area_code.focus();
		return;
	}
	
	if(isNumber(form.p_last_num) == false){	//¼ýÀÚ¸¸ µé¾î°¥ ¼ö ÀÖ°Ô
		alert('The Home Phone Number is incorrect!!!');			//isNumber´Â string.js¿¡ ÀÖÀ½
		form.p_last_num.focus();
		return;
	}

 
	// checkboxÀÇ nameÀÌ °°À» ¶§´Â ÀÌ·¸°Ô »ç¿ë
  for(var i=0; i < form.p_sale_dept.length; i++ )
  {
    if(form.p_sale_dept[i].checked == true )
    	  chk_cnt++;
	}
		if( chk_cnt <= 0 )
		{
			alert('Please select at least one Handling Item!!!');
      return;
    }

	form.target = 'main';
	form.action = '/servlet/lctE051.lctE051e';
	form.submit();
}	 //End of country_Check()


