<!--
//ÇÁ·¹ÀÓ ÅëÇÏÁö ¾Ê°í Á¢±ÙÇÒ °æ¿ì
//±âº» º¸¾È °ü·Ã
//document.oncontextmenu=function(){return false;}
//document.ondragstart=function(){return false;}
//document.onselectstart=function(){return false;} 
//document.onmousedown=click
//document.onkeydown=click
function click()
{
	if ((event.button==2) || (event.button==3) || (event.keyCode == 93))
	{
		return false;
	}
	else
	{
		if((event.ctrlKey) && (event.keyCode == 67))
		{
			return false;
		}
	}
}

//°æ·Î°¨Ãß±â °ü·Ã
window.defaultStatus='::: ÀÛÀº¿¹¼ö¼ö³àÈ¸È¸ :::';
document.onmouseover=hidestatus ;
document.onmouseout=hidestatus ;

function hidestatus()
{ 
	window.status='::: ÀÛÀº¿¹¼ö¼ö³àÈ¸È¸ :::';
	return true;
} 

function onlyInt(xxx)
{
	if ((event.keyCode < 48) || (event.keyCode > 57))
	{
		event.returnValue = false;
	}
}

function chkInt(what)
{
	var valid = "0123456789"; // À¯È¿ÇÑ °ª
	for(i=0;i<what.length;i++)
	{
		idcheck = what.charAt(i);
		for(j=0; j<valid.length; j++)
		{
			if(idcheck == valid.charAt(j)) break;
			if(j+1 == valid.length) return false;
		}
	}
	return true;
}

function noSpace(obj)
{
	if((event.keyCode == 32))
	{
		event.returnValue = false;
	}
}

function noHan(obj)
{
// onKeyUp="noHan(this)"¿¡¼­ »ç¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù.
	var str, len, temp, bln;

	str = obj.value;
	len = obj.value.length;

	for(var k=0;k<len;k++)
	{
		temp = str.charAt(k);
		if(escape(temp).length > 4)
		{
			bln = false;
			break;
		}
		else
		{
			bln = true;
		}
	}
	if(!bln)
	{
		alert("ÇÑ±ÛÀ» »ç¿ëÇÏ½Ã¸é ¾ÈµË´Ï´Ù.");
		obj.value = "";
	}
	return bln;
}

//±ÛÀÚ¼ö Á¦ÇÑÇÏ´Â ÇÔ¼ö
function chkMaxLen(maxLen,obj)
{
	if(!isMaxLen(maxLen,obj))
	{
		alert("¸Þ½ÃÁö ÃÖ´ë ÀÔ·Â Çã¿ë ±ÛÀÚ¼ö (" + maxLen + "ÀÚ) À»(¸¦) ÃÊ°úÇß½À´Ï´Ù !");
		trimMsg(maxLen,obj);
		return false;
	}
	return true;
}

function isMaxLen(maxLen,obj)
{
	var str, len, temp, tot_cnt, obj_cnt;

	str = obj.value;
	len = obj.value.length;
	tot_cnt = 0;

	for(var k=0;k<len;k++)
	{
		temp = str.charAt(k);
		escape(temp).length > 4 ? tot_cnt += 2 : tot_cnt++;
	}
	return tot_cnt > maxLen ? false : true;
}

function trimMsg(maxLen,obj)
{
	var el, str, disp_str, len, temp, tot_cnt, pos, pos_cnt, chk_msg_len;

	chk_msg_len = maxLen;
	str = obj.value;
	len = obj.value.length;
	tot_cnt = 0;
	pos = 0;
	pos_cnt = 0;
	disp_str = "";

	for(var k=0;k<len;k++)
	{
		temp = str.charAt(k);
		if(escape(temp).length > 4)
		{
			if (tot_cnt <= chk_msg_len && (pos_cnt + 2) <= chk_msg_len) pos_cnt += 2;
			tot_cnt += 2;
		}
		else
		{
			if (tot_cnt <= chk_msg_len && (pos_cnt + 1) <= chk_msg_len) pos_cnt++;
			tot_cnt++;
		}

		if (tot_cnt <= chk_msg_len)
		{
			disp_str = disp_str + temp;
		}
	}

	obj_cnt.value = pos_cnt;

	if(tot_cnt >= chk_msg_len)
	{
		obj.value = disp_str;
		obj.focus();
	}
}

//µå¸²À§¹ö ±âº» ½ºÅ©¸³Æ®
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.0
  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 && document.getElementById) x=document.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];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.name="frameMainTce";
  var popupwin=window.open(theURL,winName,features);
  popupwin.focus();
}

//°¡ÀÔ ·Î±×ÀÎ °ü·Ã ÄÚµå////////////////////////////////////////////////////////
function Login() {
	var strHref="";
	if (location.href.indexOf('#')>-1){
		strHref = location.href.substr(0, location.href.indexOf('#'));
	}
	else{
		strHref = location.href;
	}

	if (strHref.indexOf('?url=')>-1)
	{
		location.href = "/member/index.cfm?act=login&returnURL=" + (strHref.substr(strHref.indexOf('?url=')+5));
	}
	else
	{
		location.href = "/member/index.cfm?act=login&returnURL=" + escape(strHref);//board/bbsm¿¡µµ °°Àº °æ·Î°¡ ÀÖ´Ù.
	}
}

function LoginPopup() {
	var strHref="";
	if (location.href.indexOf('#')>-1){
		strHref = location.href.substr(0, location.href.indexOf('#'));
	}
	else{
		strHref = location.href;
	}

	if (strHref.indexOf('?url=')>-1)
	{
		MM_openBrWindow('/main_service/member/log/p_login.asp?url=' + (strHref.substr(strHref.indexOf('?url=')+5)),'winPopFrmLogin','width=262,height=165')
	}
	else
	{
		MM_openBrWindow('/main_service/member/log/p_login.asp?url=' + escape(strHref),'winPopFrmLogin','width=262,height=165')
	}
}

function Logout() {
	location.href = "/member/index.cfm?act=logout";
}

function Register() {
	var strHref="";
	if (location.href.indexOf('#')>-1){
		strHref = location.href.substr(0, location.href.indexOf('#'));
	}
	else{
		strHref = location.href;
	}

	if (strHref.indexOf('?url=')>-1)
	{
		location.href = "/main_service/member/usr/DisInsRegAgree.asp?url=" + (strHref.substr(strHref.indexOf('?url=')+5));
	}
	else
	{
		location.href = "/main_service/member/usr/DisInsRegAgree.asp?url=" + escape(strHref);
	}
}

function RegisterPrivacy() {
	var strHref="";
	if (location.href.indexOf('#')>-1){
		strHref = location.href.substr(0, location.href.indexOf('#'));
	}
	else{
		strHref = location.href;
	}

	if (strHref.indexOf('?url=')>-1)
	{
		location.href = "/main_service/member/usr/DisInsRegPrivacy.asp?url=" + (strHref.substr(strHref.indexOf('?url=')+5));
	}
	else
	{
		location.href = "/main_service/member/usr/DisInsRegPrivacy.asp?url=" + escape(strHref);
	}
}

function Order(intUserNo, intIdx) {
	var strHref="";
	if (location.href.indexOf('#')>-1){
		strHref = location.href.substr(0, location.href.indexOf('#'));
	}
	else{
		strHref = location.href;
	}

	if (strHref.indexOf('?UserNo=')>-1)
	{
		location.href = "/main_service/member/ord/order.asp?UserNo=" + (strHref.substr(strHref.indexOf('?UserNo=')+5));
	}
	else
	{
		location.href = "/main_service/member/ord/order.asp?UserNo=" + intUserNo + '&idx=' + intIdx + "&url=" + escape(strHref);
	}
}

function OrderPopup(intUserNo, intIdx) {
	var strHref="";
	if (location.href.indexOf('#')>-1){
		strHref = location.href.substr(0, location.href.indexOf('#'));
	}
	else{
		strHref = location.href;
	}

	if (strHref.indexOf('?UserNo=')>-1)
	{
		MM_openBrWindow('/main_service/member/ord/p_order.asp?UserNo=' + (strHref.substr(strHref.indexOf('?UserNo=')+5)),'winPopFrmOrder','width=530,height=530,scrollbars=0,scroll=0,resizable=0,status=1')
	}
	else
	{
		MM_openBrWindow('/main_service/member/ord/p_order.asp?UserNo=' + intUserNo + '&idx=' + intIdx + '&url=' + escape(strHref),'winPopFrmOrder','width=530,height=530,scrollbars=0,scroll=0,resizable=0,status=1')
	}
	//register_ok.asp¿¡µµ ÀÖ´Ù.
}

//·Î±×ÀÎ Æû°Ë»ç °ü·Ã ÄÚµå/////////////////////////////////////////////////////
var rgExpPWD=/^(.{4,12})$/i 

function fncLogCheckModulePWD(objForm)//ºñ¹Ð¹øÈ£ °Ë»ç
{
	if (!fncRegCheckTypeRegExp(objForm.PWD, "ºñ¹Ð¹øÈ£", rgExpPWD))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

//°¡ÀÔ Æû°Ë»ç °ü·Ã ÄÚµå/////////////////////////////////////////////////////
function fncRegCheckModuleKorName(objForm,strInputName)//ÀÌ¸§ °Ë»ç
{
	if (!fncRegCheckTypeValid(objForm.KorName,strInputName))//ÀÌ¸§ ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeSpace(objForm.KorName,strInputName))//ÀÌ¸§ ºóÄ­ ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeLang(objForm.KorName,strInputName,"ÇÑ±Û"))//ÀÌ¸§ ÇÑ±Û ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

function fncRegCheckModuleEngName(objForm,strInputName)//ÀÌ¸§ °Ë»ç
{
	if (!fncRegCheckTypeValid(objForm.EngName,strInputName))//ÀÌ¸§ ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeLang(objForm.EngName,strInputName,"¿µ¾î"))//ÀÌ¸§ ¿µ¾î ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

function fncRegCheckModuleChnName(objForm, blnValid, strInputName)//ÀÌ¸§ °Ë»ç
{
	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	if (!blnValid&&objForm.ChnName.value.length==0)
	{
		return true;
	}
	if (!fncRegCheckTypeValid(objForm.ChnName,strInputName))//ÀÌ¸§ ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeLang(objForm.ChnName,strInputName,"ÇÑÀÚ"))//ÀÌ¸§ ¿µ¾î ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

function fncRegCheckModuleUserID(objForm)//¾ÆÀÌµð °Ë»ç
{
	var intMin = 4//¾ÆÀÌµð ±æÀÌ Á¤º¸
	var intMax = 12

	var rgExpUserID=/^(\w+(\.\w+)*)$/i 

	if (!fncRegCheckTypeLength(objForm.UserID,"¾ÆÀÌµð",intMin,intMax))//ÀÔ·Â ±æÀÌ °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objForm.UserID, "¾ÆÀÌµð", rgExpUserID))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

function spacebar(xxx)
{
	if((event.keyCode == 32)){
		xxx.value = "";
		event.returnValue = false;
	}
}

function fncRegCheckModulePWD(objForm,blnValid)//ºñ¹Ð¹øÈ£ °Ë»ç
{
	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	//rgExpPWD´Â fncLogCheckModulePWD À§¿¡ ÀÖ´Ù

	if (!blnValid&&objForm.PWD1.value.length==0)
	{
		return true;
	}
	if (!fncRegCheckTypeRegExp(objForm.PWD1, "ºñ¹Ð¹øÈ£", rgExpPWD))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (objForm.PWD1.value == objForm.UserID.value)
	{
		alert("¾ÆÀÌµð¿Í ºñ¹Ð¹øÈ£°¡ °°½À´Ï´Ù.");
		objForm.PWD1.focus();
		return false;
	}
	if (objForm.PWD1.value != objForm.PWD2.value)
	{
		alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
		objForm.PWD2.focus();
		return false;
	}
	return true;
}

function fncRegCheckModuleDay(objForm, blnValid, strName)//»ý³â¿ùÀÏ °Ë»ç
{

	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	objYear = eval(objForm.id+"."+strName+"Year");
	objMonth = eval(objForm.id+"."+strName+"Month");
	objDay = eval(objForm.id+"."+strName+"Day");

	if (!blnValid&&objYear.value.length==0&&objMonth.value.length==0&&objDay.value.length==0)
	{
		return true;
	}
	return checkDate(objYear, objMonth, objDay);
}

function fncRegCheckModuleSSN(objForm, blnDom)//ÁÖ¹Îµî·Ï¹øÈ£ °Ë»ç
{
	var rgExpSSN1=/^([0-9]{6})$/i 
	var rgExpSSN2=/^([0-9]{7})$/i 

	if (!fncRegCheckTypeRegExp(objForm.SSN1, "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®", rgExpSSN1))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objForm.SSN2, "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®", rgExpSSN2))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!ValidResidentNum(objForm.SSN1.value, objForm.SSN2.value, blnDom)) {
		alert("À¯È¿ÇÏÁö ¾ÊÀº ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
		objForm.SSN1.focus();
		return false;
	}
	return true;
}

function fncRegCheckModuleEmail(objForm, blnValid)//ÀÌ¸ÞÀÏ °Ë»ç
{
	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	var rgExpEmail=/^(\w+(\.\w+)*)@((\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(\.[a-z]{2})?)$/i 

	if (!blnValid&&objForm.Email.value.length==0)
	{
		return true;
	}
	if (!fncRegCheckTypeRegExp(objForm.Email, "ÀÌ¸ÞÀÏ", rgExpEmail))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if(objForm.Email.value.indexOf('@hanmail.net')>-1 || objForm.Email.value.indexOf('@daum.net')>-1)
	{
		alert("ÇÑ¸ÞÀÏÀÌ ¾Æ´Ñ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		objForm.Email.focus();
		return false;
	}
	return true;
}

/*
011 016 017 018 019
02
031 032 033
041 042 043
051 052 053 054 055
061 062 063 064
080
*/
function fncRegCheckModuleTel(objForm, blnValid, strPlace)//ÀüÈ­¹øÈ£ °Ë»ç
{
	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	var rgExpTel1=/^(0(1[016789]|2|[3456][1-9]|80))$/i 
	var rgExpTel2=/^([0-9]{3,4})$/i 
	var rgExpTel3=/^([0-9]{4})$/i 

	strPlace = trim(strPlace);
	if ( strPlace!="Hom" && strPlace!="Wrk" &&  strPlace!="Fax")
	{
		alert("ÇÔ¼ö ÀÔ·Â°ªÀÌ Àß¸øµÇ¾ú½À´Ï´Ù. Àå¼Ò ÆÄ¶ó¹ÌÅÍ¿¡ 'Hom'È¤Àº 'Wrk', 'Fax'¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		return false;
	}

	objTel1 = eval(objForm.id+"."+strPlace+"Tel1");
	objTel2 = eval(objForm.id+"."+strPlace+"Tel2");
	objTel3 = eval(objForm.id+"."+strPlace+"Tel3");

	if (!blnValid&&objTel1.value.length==0&&objTel2.value.length==0&&objTel3.value.length==0)
	{
		return true;
	}
	if (!fncRegCheckTypeRegExp(objTel1, "Áö¿ª¹øÈ£", rgExpTel1))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objTel2, "±¹¹ø", rgExpTel2))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objTel3, "ÀüÈ­¹øÈ£", rgExpTel3))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

function fncRegCheckModuleCelPhone(objForm, blnValid)//ÇÚµåÆù¹øÈ£ °Ë»ç
{
	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	var rgExpTel2=/^([0-9]{3,4})$/i 
	var rgExpTel3=/^([0-9]{4})$/i 

	if (!blnValid&&objForm.CelPhone1.value.length==0&&objForm.CelPhone2.value.length==0&&objForm.CelPhone3.value.length==0)
	{
		return true;
	}
	if (!fncRegCheckTypeValid(objForm.CelPhone1,"ÇÚµåÆù¹øÈ£"))//ÇÚµåÆù¹øÈ£ ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objForm.CelPhone2, "ÇÚµåÆù¹øÈ£", rgExpTel2))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objForm.CelPhone3, "ÇÚµåÆù¹øÈ£", rgExpTel3))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

function fncRegCheckModuleAddress(objForm, blnValid, strPlace)//ÁÖ¼Ò °Ë»ç
{
	//blnValid´Â ÀÔ·ÂÇß´ÂÁö ¾Æ´ÑÁö °Ë»ç°¡ ÇÊ¼öÀÏ ¶§(°¡ÀÔ½Ã¿¡) TrueÀÌ´Ù
	var rgExpZipCode=/^([0-9]{3})$/i 

	strPlace = trim(strPlace);
	if ( strPlace!="Hom" && strPlace!="Wrk" && strPlace!="Reg")
	{
		alert("ÇÔ¼ö ÀÔ·Â°ªÀÌ Àß¸øµÇ¾ú½À´Ï´Ù. Àå¼Ò ÆÄ¶ó¹ÌÅÍ¿¡ 'Hom'È¤Àº 'Wrk', 'Reg'¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		return false;
	}

	objZipCode1 = eval(objForm.id+"."+strPlace+"ZipCode1");
	objZipCode2 = eval(objForm.id+"."+strPlace+"ZipCode2");
	objAddress = eval(objForm.id+"."+strPlace+"Address");

	if (!blnValid&&objZipCode1.value.length==0&&objZipCode2.value.length==0&&objAddress.value.length==0)
	{
		return true;
	}
	if (!fncRegCheckTypeRegExp(objZipCode1, "¿ìÆí¹øÈ£", rgExpZipCode))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeRegExp(objZipCode2, "¿ìÆí¹øÈ£", rgExpZipCode))//Á¤±Ô½Ä ÀÔ·Â °Ë»ç
	{
		return false;
	}
	if (!fncRegCheckTypeValid(objAddress,"ÁÖ¼Ò"))//ÁÖ¼Ò ÀÔ·Â °Ë»ç
	{
		return false;
	}
	return true;
}

///////////////////////////////////////////////////////////////////////////////
function fncRegCheckTypeValid(objInput,strInputName)
{
	var strInputValue = trim(objInput.value);
	objInput.value = strInputValue;
	if (strInputValue.length == 0)  {
		alert(strInputName+"À»(¸¦) ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		objInput.focus();
		return false;
	}
	return true;
}

function fncRegCheckTypeSpace(objInput,strInputName)
{
	var strInputValue = trim(objInput.value);
	objInput.value = strInputValue;
	if (strInputValue.indexOf(" ") > -1)  {
		alert(strInputName+"¿¡ ºóÄ­ ¾øÀÌ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		objInput.focus();
		return false;
	}
	return true;
}

function fncRegCheckTypeRegExp(objInput,strInputName,strRegExp)
{
	var strInputValue = trim(objInput.value);
	objInput.value = strInputValue;
	if (!strRegExp.test(strInputValue)){ 
		alert(strInputName+"ÀÌ(°¡) Çü½Ä¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù. Çü½Ä¿¡ ¸Â°Ô ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		objInput.focus();
		return false;
	}
	return true;
}

function fncRegCheckTypeLength(objInput,strInputName,intMin,intMax)
{
	var strInputValue = trim(objInput.value);
	objInput.value = strInputValue;
	if (strInputValue.length < intMin || strInputValue.length > intMax)  {
		alert(strInputName+"À»(¸¦) "+intMin+"~"+intMax+"ÀÚ ÀÌ³»·Î ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		objInput.focus();
		return false;
	}
	return true;
}

function fncRegCheckTypeLang(objInput,strInputName,strLang)
{
	var strInputValue = trim(objInput.value);
	var blnLang;
	var i = 0;

	strLang = trim(strLang);
	if ( strLang!="¿µ¾î" && strLang!="ÇÑ±Û" && strLang!="ÇÑÀÚ")
	{
		alert("ÇÔ¼ö ÀÔ·Â°ªÀÌ Àß¸øµÇ¾ú½À´Ï´Ù. ¾ð¾î ÆÄ¶ó¹ÌÅÍ¿¡ '¿µ¾î'È¤Àº 'ÇÑ±Û', 'ÇÑÀÚ'¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		return false;
	}

	if ( strLang=="¿µ¾î")
		strLang = "¿µ¾î, ¼ýÀÚ";

	if (navigator.appName != "Netscape" )
	{
		while (i < strInputValue.length)
		{

			if (strInputValue.charCodeAt(i) > 0 && strInputValue.charCodeAt(i) < 256)
				blnLang = "¿µ¾î, ¼ýÀÚ";
			else if (strInputValue.charCodeAt(i) >= 44032 && strInputValue.charCodeAt(i) <= 55203 && strLang == "ÇÑ±Û" ) 
				blnLang = "ÇÑ±Û";
			else if (strInputValue.charCodeAt(i) >= 44032 && strInputValue.charCodeAt(i) <= 55203 && strLang == "ÇÑÀÚ" ) 
				blnLang = "ÇÑÀÚ";
			else if (strInputValue.charCodeAt(i) >= 19968 && strInputValue.charCodeAt(i) <= 40869)
				blnLang = "ÇÑÀÚ";

			if (strLang != blnLang)
			{
				alert(strInputName+"¿¡ "+blnLang+"¾øÀÌ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
				objInput.value = strInputValue;
				objInput.focus();
				return false;
			}
			i = i + 1;
		}
	}
	return true;
}

function fncRegCheckTypeChkBox(objInput,strInputName)
{
	if (objInput != '[object]')
	{
		alert(strInputName+"ÀÌ(°¡) Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.");
		return false;
	}	
	else if (isNaN(objInput.length))
	{
		if (objInput.checked)
		{
			return true;
		}	
	}	
	else {
		for (var i=0; i<objInput.length; i++) {
			if (objInput[i].checked)
			{
				return true;
			}	
		}
	}

	alert(strInputName+"À»(¸¦) ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
	return false;
}

//°¡ÀÔ ÆäÀÌÁö ÆË¾÷Ã¢ °ü·Ã ÄÚµå/////////////////////////////////////////////////////
function open_id_check_page(objForm)//¾ÆÀÌµð Áßº¹ °Ë»çÃ¢
{
	if (fncRegCheckModuleUserID(objForm)){
		MM_openBrWindow('/main_service/member/usr/p_id_check.asp?Form='+objForm.id+'&UserID='+objForm.UserID.value,'winPopFrmUserIDValid','width=450,height=210')
	}
}

function open_zip_search_page(id)
{
	MM_openBrWindow('/main_service/member/usr/PopDisXMLZip.asp?id='+id,'winPopFrmZipSrch','width=470,height=335,scrollbars=yes')
}

function fncSSNCheckPopup(objForm, blnDom)//ÁÖ¹Îµî·Ï¹øÈ£ Áßº¹ °Ë»çÃ¢
{
	if (fncRegCheckModuleSSN(objForm, blnDom)){
		MM_openBrWindow('/main_service/member/usr/p_ssn_check.asp?SSN='+objForm.SSN1.value+objForm.SSN2.value,'winPopFrmSSNValid','width=450,height=210');
	}
}

//°¡ÀÔ ÀÔ·Â ÀÚµ¿ °ü·Ã ÄÚµå/////////////////////////////////////////////////////
//ÁÖ¹Îµî·Ï¹øÈ£ ÀÔ·ÂÇÏ¸é ÀÚµ¿ »ý³â¿ùÀÏ ¼ºº° Ã¤¿öÁÜ
function fncBthDayFill(objForm)
{
	var intSSN = objForm.SSN1.value
	if (objForm.SSN2.value != "")
	{
		var intSex = objForm.SSN2.value.substring(0,1)

		//³â
		if (intSex == 1 || intSex == 2 || intSex == 5 || intSec == 6)
		{
			objForm.BthYear.value = "19"+intSSN.substring(0,2);
		}
		else if (intSex == 3 || intSex == 4 || intSex == 7 || intSec == 8)
		{
			objForm.BthYear.value = "20"+intSSN.substring(0,2);
		}
		else if (intSex == 9 || intSex == 0)
		{
			objForm.BthYear.value = "18"+intSSN.substring(0,2);
		}

		//¿ù
		objForm.BthMonth.value = intSSN.substring(2,4);
		//ÀÏ
		objForm.BthDay.value = intSSN.substring(4,6);

		//¼ºº°
		if (intSex % 2 == 1)
		{
			objForm.Sex[0].checked = true;//³²ÀÚ
		}
		else
		{
			objForm.Sex[1].checked = true;//¿©ÀÚ
		}
	}
}

//³¯Â¥ °ü·Ã ÄÚµå/////////////////////////////////////////////////////
// ³¯Â¥ Ã¼Å©....
function checkDate(objYear, objMonth, objDay) {
	if (objYear.value.length != 4) {
		alert("³âµµ¸¦ Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ¼¼¿ä.");
		objYear.focus();
		return false;
	}
	else if (objMonth.value == "") {
		alert("¿ùÀ» Á¤È®ÇÏ°Ô ¼±ÅÃÇÏ¼¼¿ä.");
		objMonth.focus();
		return false;
	}
	else if (objDay.value == "") {
		alert("ÀÏÀ» Á¤È®ÇÏ°Ô ¼±ÅÃÇÏ¼¼¿ä.");
		objDay.focus();
		return false;
	}
	else {
		var intDays = getDaysInMonth(objMonth.value,objYear.value);
		if (objDay.value > intDays) {
			alert(objYear.value + "³â " + objMonth.value + "¿ùÀº " + intDays + "ÀÏ ±îÁö ÀÔ´Ï´Ù.");
			objDay.focus();
			return false;
		}
	}
	return true
}

// ¿ùº° ¸¶Áö¸· ³¯Â¥À» ¸®ÅÏ.
function getDaysInMonth(intMonth,intYear)  {
	var intDays;
	if (intMonth==1 || intMonth==3 || intMonth==5 || intMonth==7 || intMonth==8 || intMonth==10 || intMonth==12)  intDays=31;
	else if (intMonth==4 || intMonth==6 || intMonth==9 || intMonth==11) intDays=30;
	else if (intMonth==2)  {
		if (isLeapYear(intYear)) { intDays=29; }
		else { intDays=28; }
	}
	return (intDays);
}

// 4³â ÁÖ±âÃ¼Å©.
function isLeapYear (intYear) {
	if (((intYear % 4)==0) && ((intYear % 100)!=0) || ((intYear % 400)==0)) {
		return (true);
	} else { return (false); }
}

// ¿À´Ã³¯Â¥ Set
function setToDay (objYear, objMonth, objDay) {
	var today = new Date();
	objYear.value = today.getFullYear();
	objMonth.value = today.getMonth()+1;
	objDay.value = today.getDate();
}


//ÀÏ¹Ý ÄÚµå/////////////////////////////////////////////////////
//trim ¸Þ¼Òµå 
function ltrim(str) 
{ 
	 var s = new String(str); 
	return (s.substr(0,1) == " ") ? ltrim(s.substr(1)) : s;
} 

function rtrim(str) 
{ 
	var s = new String(str); 
	return (s.substr(s.length-1,1) == " ") ? rtrim(s.substring(0, s.length-1)) : s;
} 

function trim(str) 
{ 
	return ltrim(rtrim(str));
}

function checklen(str)
{
	var len = 0;
	var i = 0;

	if (navigator.appName != "Netscape" )
	{
		while (i < str.value.length)
		{
			if (str.value.charCodeAt(i) > 0 && str.value.charCodeAt(i) < 256)
				len = len + 1;
			else
			{
				len = -1;
				return len;
			}
			i = i + 1;
		}
	}
	return len;
}

function ValidResidentNum (val1, val2, blnDom) //ÁÖ¹Îµî·Ï¹øÈ£ °Ë»ç ¸ðµâ
{
	var t1, t2, t3, t4, t5, t6, t7, t11, t12, t13, t14, t15, t16, t17;
  
	t1 = val1.substring(0,1);
	t2 = val1.substring(1,2);
	t3 = val1.substring(2,3);
	t4 = val1.substring(3,4);
	t5 = val1.substring(4,5);
	t6 = val1.substring(5,6);
	t11 = val2.substring(0,1);
	t12 = val2.substring(1,2);
	t13 = val2.substring(2,3);
	t14 = val2.substring(3,4);
	t15 = val2.substring(4,5);
	t16 = val2.substring(5,6);
	t17 = val2.substring(6,7);

	var tot = t1*2 + t2*3 + t3*4 + t4*5 + t5*6 + t6*7;
	tot += t11*8 + t12*9 + t13*2 + t14*3 + t15*4 + t16*5 ;
if (blnDom == true) {
	var result = (13 - tot % 11) % 10;
}
else {
	var result = (11 - tot % 11) % 10;
}

	if (result != t17){
		return false;
    }
	return true;
}

function adjustImage(target_img, maxWidth, maxHeight)
{
	var newX, newY;
	var newHeight, newWidth;
	var newImg;

	newImg = new Image();
	newImg.src = target_img.src;
	imgw = newImg.width;
	imgh = newImg.height;
		
	if (imgw > maxWidth || imgh > maxHeight)
	{
		if(imgw > maxWidth)
			newWidth = maxWidth;
		else
			newWidth = imgw;

		if(imgh > maxHeight)
			newHeight = maxHeight;
		else
			newHeight = imgh;

		newWidth = Math.min(newWidth, Math.round((imgw*newHeight)/imgh));
		newHeight = Math.min(Math.round((imgh*newWidth)/imgw), newHeight);
	}
	else
	{
		newWidth = imgw;
		newHeight = imgh;
	}
	newX = maxWidth/2 - newWidth/2;
	newY = maxHeight/2 - newHeight/2;

	target_img.onload = null;
	target_img.src = newImg.src;
	target_img.width = newWidth;
	target_img.height = newHeight;
}

function fncChkAll(objForm,objInput){ 
/*
	blnFlag = false
	for (var i=0; i<objChkUsr.length; i++) {
		if (objChkUsr[i].checked== false) {
			blnFlag = true;
			break;
		}
	}
*/

	blnFlag = objForm.objChkAll.checked;
	if (objInput != '[object]')
	{
		objForm.objChkAll.checked = false;
	}	
	else if (isNaN(objInput.length))
	{
		objInput.checked = blnFlag;
	}	
	else {
		for (var i=0; i<objInput.length; i++) {
			objInput[i].checked = blnFlag;
		}
	}
} 

function setCookie(name,value)
{
	var argc = setCookie.arguments.length;
	var argv = setCookie.arguments;

	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	
	document.cookie = name + "=" + escape(value) +
		((expires==null) ? "" : ("; expires=" + expires.toGMTString())) +
		((path==null) ? "" : ("; path=" + path)) +
		((domain==null) ? "" : ("; domain=" + domain)) +
		((secure==true) ? "; secure" : "");
}

function getCookie(name)
{
	var nameOfCookie = name + "=";
	var x = 0;
	
	while (x <= document.cookie.length)
	{
		var y = (x + nameOfCookie.length);
		if (document.cookie.substring(x,y) == nameOfCookie )
		{
			if ((endOfCookie=document.cookie.indexOf(";",y)) == -1)
				endOfCookie = document.cookie.length;
			return unescape(document.cookie.substring(y,endOfCookie));
		}
		x = document.cookie.indexOf(" ", x ) + 1;
		if (x == 0) break;
	}
	return "";
}

function delCookie (name)
{
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = getCookie(name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

function fncChkUserID() {
	var strUserID = getCookie("UserID");
	if (strUserID.length == 0) location.href = '/member/index.cfm?act=login&returnURL=' + location.href;
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable,location) {
	var WO;
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	location_str = location ? 'yes' : 'no';
	WO = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',location='+location_str+',dependent=yes');
	WO.focus();
	return WO;
}

function fix_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable,location) {
	var WO;
	var winleft = screen.width - width - 10;
	var wintop = 100;
	
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	location_str = location ? 'yes' : 'no';
	WO = window.open(url, name, 'left='+winleft+',top='+wintop+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',location='+location_str+',dependent=yes');
	WO.focus();
	return WO;
}

function right_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable,location) {
	var WO;
	var winleft = screen.width - width - 10;
	var wintop = 100;
	
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	location_str = location ? 'yes' : 'no';
	WO = window.open(url, name, 'left='+winleft+',top='+wintop+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',location='+location_str+',dependent=yes');
	WO.focus();
	return WO;
}

function center_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable, location) {
	var WO;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2;
	
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	location_str = location ? 'yes' : 'no';
	WO = window.open(url, name, 'left='+winleft+',top='+wintop+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',location='+location_str+',dependent=yes');
	WO.focus();
	return WO;
}

function goPlayer()
{
	var playseq = "";
	var CategID = arguments[0];
	if(arguments[1] != null)
	{
	playseq = arguments[1];
	}
	else
	{
	var s_entry = frm.elements('s_entry[]');
	
	var icnt = 0;
	for(var idx = 0; idx < s_entry.length; idx++)
	{
	if (s_entry[idx].checked == true)
	{
	playseq += "," + s_entry[idx].value;
	icnt++;
	}
	}

	if (icnt == 0)
	{
	alert("¿¬¼Óµè±âÇÒ °îÀ» ¼±ÅÃÇØÁÖ½Ê½Ã¿À");
	return;
	}

	playseq = playseq.substr(1, playseq.length-1);
	}

	var obj = window.open("/common/audioplayer.php?seq=" + playseq + "&Lang=ko&CategID=" + CategID, "player", "width=300, height=40, resizable=no");
	
	if (obj == null)
	{
		alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØ ÁÖ½Ê½Ã¿À");
	}
}


function goMPlayer()
{
	var playseq = "";
	var CategID = arguments[0];
	if(arguments[1] != null)
	{
	playseq = arguments[1];
	}
	else
	{
	var s_entry = frm.elements('s_entry[]');
	var icnt = 0;
	for(var idx = 0; idx < s_entry.length; idx++)
	{
	if (s_entry[idx].checked == true)
	{
	playseq += "," + s_entry[idx].value;
	icnt++;
	}
	}

	if (icnt == 0)
	{
	alert("¿¬¼Óµè±âÇÒ °îÀ» ¼±ÅÃÇØÁÖ½Ê½Ã¿À");
	return;
	}

	playseq = playseq.substr(1, playseq.length-1);
	}

	var obj = window.open("/common/movieplayer.php?seq=" + playseq + "&Lang=ko&CategID=" + CategID, "player", "width=640, height=485, resizable=no");
	
	if (obj == null)
	{
		alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØ ÁÖ½Ê½Ã¿À");
	}
}

function popSearchIDPwd()
{
	var obj = window.open('../common/findIDPwd.php','findIDPwd','width=350,height=250');
	
	if (obj == null)
	{
		alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØ ÁÖ½Ê½Ã¿À");
	}
}
//-->
