
function chkLogin(form){
	if(form.userId.value == ''){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		form.userId.focus();
		return false;
	}
	else if(form.passwd.value == ''){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		form.passwd.focus();
		return false;
	}
	return true;
}

function chkTopLogin(){
	if(document.loginForm.userId.value == '' || document.loginForm.userId.value == '¾ÆÀÌµð'){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		document.loginForm.userId.value = '';
		document.loginForm.userId.focus();
		return false;
	}
	else if(document.loginForm.passwd.value == '' || document.loginForm.passwd.value == '*1*1**!!*'){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		document.loginForm.passwd.value = '';
		document.loginForm.passwd.focus();
		return false;
	}
	return true;
}

function check_autologin(form){
	if(form.checked == true){
		if(!confirm("ÀÚµ¿ ·Î±×ÀÎÀ» ¼³Á¤ÇÏ½Ã°Ú½À´Ï±î?\n\nÀÚµ¿ ·Î±×ÀÎÀ» ¼³Á¤ÇÏ½Ã¸é ÇöÀç PC¿¡ ¾ÆÀÌµð°¡ ÀúÀåµÇ¾î\n´Ù½Ã ·Î±×ÀÎ½Ã ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.\n\n[ÁÖÀÇ] ÇÐ±³³ª ÇÐ¿ø, PC¹æ Ã³·³ ÄÄÇ»ÅÍ¸¦ °øµ¿À¸·Î »ç¿ëÇÏ´Â È¯°æ¿¡¼­´Â \nÅ¸ÀÎ¿¡°Ô °³ÀÎÁ¤º¸°¡ À¯ÃâµÉ¼ö ÀÖÀ¸´Ï »ç¿ëÇÏÁö ¾Ê´Â°ÍÀÌ ÁÁ½À´Ï´Ù.") ){
			form.checked = false;
		}
	}
}


function callSpecialCouponInfo(md) {
	var ow = window.open("/popup/SpecialCouponInfo.xg?mode="+md,"sp_auction","left=10,top=10,width=490,height=520,scrollbars=no,resizable=yes,scrollbars=yes");
	ow.focus();
}


function callPop(wname){
	var twidth = 0;
	var theight = 0;
	var tscrollbars = "no";
	switch(wname){
		case "introduce":
			twidth = 670;
			theight = 500;
		break;
		case "advertising":
			twidth = 500;
			theight = 500;
		break;
		case "manual_1":
			twidth = 687;
			theight = 650;
			tscrollbars = "yes";
		break;
		case "manual_2":
			twidth = 687;
			theight = 650;
			tscrollbars = "yes";
		break;
		case "manual_3":
			twidth = 687;
			theight = 650;
			tscrollbars = "yes";
		break;
		case "manual_4":
			twidth = 687;
			theight = 650;
			tscrollbars = "yes";
		break;
		case "private":
			twidth = 687;
			theight = 500;
			tscrollbars = "yes";
		break;
		case "agreement":
			twidth = 687;
			theight = 670;
			tscrollbars = "yes";
		break;
		case "partner":
			twidth = 500;
			theight = 500;
		break;
	}
	window.open("/popup/_" + wname + ".xg",wname,"width=" + twidth + ",height=" + theight + ",top=0,left=0,scrollbars=" + tscrollbars);
}

function callMovieDis(){
	window.open("/_movieDis/pop_booking.xg","movieBooking","width=500,height=500,top=0,left=0,scrollbars=no");
}

function callFindIdPw(){
	window.open("/popup/findIdPw.xg","regiBox","width=500,height=500,top=0,left=0,scrollbars=no");
}

function callLogBox(){
	var ow = window.open("/popup/regiBox.xg","regiBox","width=500,height=500,top=0,left=0,scrollbars=no");
	ow.focus();
}


function callZipSearch(){
	var ow = window.open("/popup/zipSearch.xg","zipSearch","width=320,height=160,scrollbars=yes,resizable=yes");
	ow.focus();
}

function callZipSearch2(){
	var ow = window.open("/popup/zipSearch2.xg","zipSearch","width=320,height=160,scrollbars=yes,resizable=yes");
	ow.focus();
}

function callZipSearch3(fname){
	var ow = window.open("/popup/zipSearch3.xg?formName="+fname,"zipSearch","width=320,height=160,scrollbars=yes,resizable=yes");
	ow.focus();
}

function callViewNotice(tnum){
	var ow = window.open("/popup/notice.xg?tid=" + tnum,"mnotice","width=420,height=350,top=0,left=0,scrollbars=yes");
	ow.focus();
}

function callDupCheck(form){
	if(form.userId.value == "" || !form.userId.value){
		window.alert('Áßº¹Ã¼Å©¸¦ ÇÏ½Ç ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.userId.focus();
		return false;
	}else{
		var ow = window.open("/popup/dupIdCheck.xg?userId=" + form.userId.value,"dupIdCheck","width=500,height=500,top=0,left=0");
		ow.focus();
	}
}

function callDupEmailCheck(form){
	if(aform.email_id.value.length == ""){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		aform.email_id.focus();
		return false;
	} 
	if(aform.selEmail.value == "def"){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		aform.selEmail.focus();
		return false;
	}  
	if(aform.selEmail.value == ""){
		if(aform.emailFooter.value.length < 1){
		  window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		  aform.email_id.focus();
		  return false;
		}
	}
	window.open("../popup/dupEmailCheck.xg?email_id=" + form.email_id.value + "&selEmail=" + aform.selEmail.value + "&emailFooter=" + aform.emailFooter.value,"dupEmailCheck","width=550,height=500,top=0,left=0");
}


function select_Settlement(form,tsettlePan){
	var msg = "";
	var i = 0;
	var chkpan = "";
	if(!form.userName.value || (blank_check(form.userName.value) == '')){
		window.alert('º»ÀÎ½Ç¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.userName.focus();
		return false;
	}

	if(!jumin_check(form.juminCode1.value + form.juminCode2.value)){
		window.alert('ÁÖ¹Î¹øÈ£¸¦ ´Ù½Ã ÇÑ¹ø È®ÀÎÇØ ÁÖ¼¼¿ä.');
		if(!form.juminCode1.value){
			form.juminCode1.focus();
			return false;
		}else{
			form.juminCode2.focus();
			return false;
		}
	}

	for(i = 0;i < form.mRank.length;i++){
		if(form.mRank[i].checked == true){
			chkpan = "checked";
		}
	}
	if(chkpan != "checked"){
		window.alert("¿øÇÏ½Ã´Â È¸¿øµî±ÞÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
		return false;
	}

	switch(tsettlePan){
		case "mobile":
			msg = "ÇÚµåÆùÀ¸·Î °¡ÀÔÇÏ½Ã°Ú½À´Ï±î?";			
		break;
		case "ars":
			msg = "ÀÏ¹ÝÀüÈ­·Î °¡ÀÔÇÏ½Ã°Ú½À´Ï±î?";
		break;
		case "account":
			msg = "¹«ÅëÀå°áÁ¦·Î °¡ÀÔÇÏ½Ã°Ú½À´Ï±î?";			
		break;
	}
	form.settlePan.value = tsettlePan;
	form.submit();
}


function blank_check(chkstr){
	var blkreg = /\s+/g;
	return chkstr.replace(blkreg,'');
}

function jumin_check(jumin){
	var hap = 0;
	var result = 0;
	var i = 0;
	var j = 2;
	jumin = jumin.replace('-','');
	for(i = 0;i < 12;i++){
		hap = hap + (parseInt(jumin.charAt(i)) * j);
		j++;
		if(j >= 10){
			j = 2;
		}
	}
	hap = 11 - (hap%11);
	result = hap % 10;
	
	if(result == jumin.charAt(12) && jumin.charAt(12) != ''){
		return true;
	}else{
		return false;
	}
}

function chgbox(form){
	form.dumipass.style.display = 'none';
	form.passwd.style.display = 'block';
	form.passwd.focus();
}

function check_agree(form){
	if(form.agree.checked == false){
		window.alert('³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ¹«·áÃ¼Çè½ÅÃ»À» ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
		return false;
	}else{
		location = 'authRegi.xg?agree=checked';
	}
}

function check_account(form){
	if(!form.bankAcc.value){
		window.alert('°èÁÂ¹øÈ£°¡ ´©¶ôµÇ¾ú½À´Ï´Ù.');
		form.bankInfo.focus();
		return false;
	}
	if(!form.bankAccName.value){
		window.alert('¿¹±ÝÁÖ°¡ ´©¶ôµÇ¾ú½À´Ï´Ù.');
		form.bankInfo.focus();
		return false;
	}
	if(!form.amount.value){
		window.alert('ÀÔ±Ý¾×ÀÌ ´©¶ôµÇ¾ú½À´Ï´Ù. ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.');
		history.go(-1);
		return false;
	}
	var tmphour = form.dHour.options[form.dHour.selectedIndex].value;
	if(tmphour == "" || !tmphour){
		window.alert('ÀÔ±Ý¿¹Á¤ ½Ã°£À» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		form.dHour.focus();
		return false;		
	}

	if(!form.userName.value){
		window.alert('ÀÔ±ÝÀÚ¸íÀÌ ´©¶ôµÇ¾ú½À´Ï´Ù. ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.');
		history.go(-1);
		return false;
	}
	form.submit();
}



function check_freeRegi(form){
	if(form.agree.checked == false){
		window.alert('¾à°ü¿¡ µ¿ÀÇÇÏ¼Å¾ß °¡ÀÔÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
		form.agree.focus();
		return false;
	}else{		
		if(!form.userName.value || (blank_check(form.userName.value) == '')){
			window.alert('º»ÀÎ½Ç¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			form.userName.focus();
			return false;
		}

		if(!jumin_check(form.juminCode1.value + form.juminCode2.value)){
			window.alert('ÁÖ¹Î¹øÈ£¸¦ ´Ù½Ã ÇÑ¹ø È®ÀÎÇØ ÁÖ¼¼¿ä.');
			if(!form.juminCode1.value){
				form.juminCode1.focus();
				return false;
			}else{
				form.juminCode2.focus();
				return false;
			}
		}
		/*
		if(!form.mobile.value || (blank_check(form.mobile.value) == '')){
			window.alert('ÈÞ´ëÆù¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			form.mobile.focus();
			return false;
		}
		*/

		form.submit();

	}
}


function check_login(form){
	if(!form.userId.value){
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.userId.focus();
		return false;
	}
	if(!form.passwd.value){
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.passwd.focus();
		return false;
	}
	return true;
}


function check_retire(form){
	if(confirm("Á¤¸»·Î °­Á¦Å»Åð ½ÃÅ°½Ã°Ú½À´Ï±î? °­Á¦Å»Åð ½ÃÅ°½Ã¸é ´Ù½Ã º¹±¸½ÃÅ³ ¼ö°¡ ¾ø½À´Ï´Ù.")){
		form.deport.value = "on";
		form.submit();
	}
}


function check_modify(form){

	if(form.passwd.value || form.rePasswd.value){
		if(!form.passwd.value || !form.rePasswd.value){
			window.alert('º¯°æÇÏ½Ã°íÀÚ ÇÏ´Â ¾ÏÈ£¸¦ ¸ðµÎ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			if(!form.passwd.value){
				form.passwd.focus();
			}else{
				form.rePasswd.focus();
			}
			return false;
		}
		if(form.passwd.value != form.rePasswd.value){
			window.alert('ºñ¹Ð¹øÈ£¶õ °ú ºñ¹Ð¹øÈ£ È®ÀÎ¶õÀÇ ¾ÏÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÇÑ¹ø ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			form.passwd.focus();
			return false;
		}
	}

	if(!form.zipCode1.value || !form.zipCode2.value){
		window.alert('¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		if(!form.zipCode1.value){
			form.zipCode1.focus();
		}else{
			form.zipCode2.focus();
		}
		return false;
	}

	if(!form.addr1.value || !form.addr2.value){
		window.alert('ÁÖ¼Ò¸¦ ¸ðµÎ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		if(!form.addr1.value){
			form.addr1.focus();
		}else{
			form.addr2.focus();
		}
		return false;
	}

	if(!form.emailHeader.value || !form.emailFooter.value){
		window.alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		if(!form.emailHeader.value){
			form.emailHeader.focus();
		}else{
			form.emailFooter.focus();
		}
		return false;
	}

	form.submit();
}

function check_makeId(form){
	if(form.dupChecked.value != "checked"){
		window.alert("¾ÆÀÌµð Áßº¹Ã¼Å©¸¦ ÇØ ÁÖ¼¼¿ä.");		
		return false;
	}
	if(!form.userId.value || (blank_check(form.userId.value) == '')){
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.userId.focus();
		return false;
	}

	var uid = form.userId.value;
	if (uid.length < 4 || uid.length > 12) {
		alert("ID´Â 4±ÛÀÚ ÀÌ»ó, 12±ÛÀÚ ÀÌÇÏÀÔ´Ï´Ù.");
		return false;
	}
	
	for (i = 0; i < uid.length; i++) {
		if (uid.charAt(i) >= '0' && uid.charAt(i) <= '9')
			continue;
		else if (uid.charAt(i) >= 'a' && uid.charAt(i) <= 'z')
			continue;
		else if (uid.charAt(i) >= 'A' && uid.charAt(i) <= 'Z')
			continue;
		else if (uid.charAt(i) == '_' || uid.charAt(i) == '-')
			continue;
		else {			
			alert("[¾ÆÀÌµð ÀÔ·Â¿À·ù] ¿µ¹®, ¼ýÀÚ Á¶ÇÕ 4ÀÚ ÀÌ»ó 12ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Å ÈÄ ¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä.");
			return false;
		}
	}
	
	if (uid.charAt(0) == '_' || uid.charAt(0) == '-') {
		alert("[¾ÆÀÌµð ÀÔ·Â¿À·ù] _ ¿Í - ¹®ÀÚ´Â Ã¹±ÛÀÚ·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n¾ÆÀÌµð¸¦ ´Ù½Ã ÀÔ·ÂÇÏ½Å ÈÄ ¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä.");
		return false;
	}

	if ( (uid.length < 4)|| (uid.length > 12) ){
		alert ("[¾ÆÀÌµð ÀÔ·Â¿À·ù] ¿µ¹®, ¼ýÀÚ Á¶ÇÕ 4ÀÚ ÀÌ»ó 12ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Å ÈÄ ¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä.");
		return false;
	}

	if(!form.passwd.value || (blank_check(form.passwd.value) == '')){
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.passwd.focus();
		return false;
	}
	form.submit();
}



function check_makeEmail(form){
	if(form.dupChecked.value != "checked"){
		window.alert("¾ÆÀÌµð Áßº¹Ã¼Å©¸¦ ÇØ ÁÖ¼¼¿ä.");		
		return false;
	}
	if(!form.emailHeader.value || (blank_check(form.emailHeader.value) == '')){
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.emailHeader.focus();
		return false;
	}

	if(!form.emailFooter.value || (blank_check(form.emailFooter.value) == '')){
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.emailFooter.focus();
		return false;
	}
	

	if(!form.passwd.value || (blank_check(form.passwd.value) == '')){
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.passwd.focus();
		return false;
	}
	form.submit();
}

function auto_emailFooter(form){
	var tf = "";
	tf = form.selEmail.options[form.selEmail.selectedIndex].value;
	form.emailFooter.value = tf;
}

function auto_emailFooter2(form){
	var tf = "";
	tf = form.selEmail.options[form.selEmail.selectedIndex].value;
	if(tf != "def"){
		if(tf == ""){
			form.selEmail.style.display = "none";
			form.emailFooter.style.display = "block";
		}else{
			form.selEmail.style.display = "block";
			form.emailFooter.style.display = "none";
		}
	}
}

function auto_emailFooter3(form){
	var tf = "";
	tf = form.selEmail.options[form.selEmail.selectedIndex].value;
	if(tf != "def"){
		if(tf == ""){
			form.emailFooter.style.display = "block";
		}else{
			form.emailFooter.style.display = "none";
		}
	}
	else{
	   form.emailFooter.style.display = "none";
	}
}

function statusMsg(){
	window.status = ":::XGCLUB:::";
	setTimeout("statusMsg()", 15);
}


function callService(gid){
	window.open("/_nude/freePay.xg?code=" + gid,"sw" + gid,"width=850,height=600,top=0,left=0,scrollbars=no");
}

function goFreeRegi(){
	window.alert("È¸¿øÀü¿ë ¼­ºñ½º ÀÔ´Ï´Ù.");
	location = "/_freeRegi/";
}


function chgChart(cnum){
	switch(cnum){
		case "1":
			tab1.style.display = "block";
			tab2.style.display = "none";
			/*
			tab3.style.display = "none";
			tab4.style.display = "none";
			*/
		break;
		case "2":
			tab1.style.display = "none";
			tab2.style.display = "block";
			/*
			tab3.style.display = "none";
			tab4.style.display = "none";
			*/
		break;
		case "3":
			tab1.style.display = "none";
			tab2.style.display = "none";
			/*
			tab3.style.display = "block";
			tab4.style.display = "none";
			*/
		break;
		case "4":
			tab1.style.display = "none";
			tab2.style.display = "none";
			/*
			tab3.style.display = "none";
			tab4.style.display = "block";
			*/
		break;
	}
}

function callNude(mid){		
	window.open("/popup/_recordViewingHistory.xg?hp=freeZone&shp=nude&code=" + mid,"tw","width=1100,height=800,scrollbars=yes");
}

function saveComicLog(tit,code,i,jp){
	window.open("/_comic/freePay.xg?title="+tit+"&code="+code+"&i="+i+"&jp="+jp,"tw","width=0,height=0");	
}	

function goSMS(form){

	var telecom = '';
	var flag = '';
	if(form.telecom[0].checked){
		telecom = "011";
	}else if(form.telecom[1].checked){
		telecom = "016";
	}else if(form.telecom[2].checked){
		telecom = "019";
	}else{
		window.alert("Åë½Å»ç¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.telecom[0].focus();
		flag = "no";
	}
	if(form.mp.value == ""){
		window.alert("°áÁ¦Á¤º¸°¡ ´©¶ôµÇ¾ú½À´Ï´Ù.");
		return false;
	}
	if(flag != "no"){
		if(goSMScheck(form)){
			var tuserId = form.userId.value;
			var telNum1 = form.mobile1.value;
			var telNum2 = form.mobile2.value;
			var telNum3 = form.mobile3.value;
			var iden1   = form.iden1.value;
			var iden2   = form.iden2.value;	  	
			var LinkURL = "../_info/popDeliver.xg?userId="+tuserId+"&telecom="+telecom+"&telNum1="+telNum1+"&telNum2="+telNum2+"&telNum3="+telNum3+"&iden1="+iden1+"&iden2="+iden2+"&mp="+form.mp.value;
			smsChk.location = LinkURL;
			//window.open(LinkURL,"cw","top=0,left=0,width=0,height=0");
		}
	}	 
}	


function goSMS2(form,mario){

	var telecom = '';
	var flag = '';
	var tmp = '';
	var i = 0;
	

	if(form.telecom[0].checked){
		telecom = "011";
	}else if(form.telecom[1].checked){
		telecom = "016";
	}else if(form.telecom[2].checked){
		telecom = "019";
	}else{
		window.alert("Åë½Å»ç¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.telecom[0].focus();
		flag = "no";
	}

	for(i = 0;i < form.mp.length;i++){
		if(form.mp[i].checked == true){
			tmp = form.mp[i].value;
		}
	}

	if(tmp == ''){
		window.alert("µî±ÞÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
		return false;
	}	


	if(flag != "no"){
		if(goSMScheck(form)){
			var telNum1 = form.mobile1.value;
			var telNum2 = form.mobile2.value;
			var telNum3 = form.mobile3.value;
			var iden1   = form.iden1.value;
			var iden2   = form.iden2.value;	  	

			var LinkURL = "../_info/popDeliver.xg?chg=on&telecom="+telecom+"&telNum1="+telNum1+"&telNum2="+telNum2+"&telNum3="+telNum3+"&iden1="+iden1+"&iden2="+iden2+"&mp="+tmp;
			smsChk.location = LinkURL;
			//window.open(LinkURL,"cw","top=0,left=0,width=0,height=0");
		}
	}	 
}	




function goSMSAuth(form,mario){

	var telecom = '';
	var flag = '';
	var tmp = '';
	var i = 0;
	
	if(!mario){
			
		if(form.telecom[0].checked){
			 telecom = "011";
		}else if(form.telecom[1].checked){
				telecom = "016";
		}else if(form.telecom[2].checked){
				telecom = "019";
		}else{
				window.alert("Åë½Å»ç¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
				form.telecom[0].focus();
				flag = "no";
		}

  }else{
  	if(form.telecom.value == ""){
 			window.alert("Åë½Å»ç¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			form.telecom.focus();
			flag = "no";
  	}
    if(form.mobile1.value == ""){
 			window.alert("ÈÞ´ëÆù ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			form.mobile1.focus();
			flag = "no";
  	}	
  	
  }

	if(flag != "no"){
		if(goSMScheck(form)){
			
			var telNum1 = form.mobile1.value;
			var telNum2 = form.mobile2.value;
			var telNum3 = form.mobile3.value;
			var iden1   = form.iden1.value;
			var iden2   = form.iden2.value;	
			if(!mario){ 	
			    var LinkURL = "../_info/popAuth.xg?telecom="+telecom+"&telNum1="+telNum1+"&telNum2="+telNum2+"&telNum3="+telNum3+"&iden1="+iden1+"&iden2="+iden2;
			}else{
				  var telecom = form.telecom.value;
			    var LinkURL = "../../_info/popAuth.xg?telecom="+telecom+"&telNum1="+telNum1+"&telNum2="+telNum2+"&telNum3="+telNum3+"&iden1="+iden1+"&iden2="+iden2;
		  }	
			smsChk.location = LinkURL;
			//window.open(LinkURL,"cw","top=0,left=0,width=0,height=0");
		}
	}	 
}	



function goSMScheck(form){
	if(form.iden1.value == ""){
		window.alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.iden1.focus();
		return false;
  }
	if(form.iden2.value == ""){
		window.alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.iden2.focus();
		return false;
  }  
  
  var jumin = form.iden1.value+"-"+form.iden2.value;
  if(!jumin_check(jumin)){
  	window.alert("¿Ã¹Ù¸£Áö ¾ÊÀº ÁÖ¹Îµî·Ï¹øÈ£ ÀÔ´Ï´Ù..");
    return false;
  }

	if(form.mobile2.value == ""){
		window.alert("ÈÞ´ëÆù ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.mobile2.focus();
		return false;
  }
	if(form.mobile3.value == ""){
		window.alert("ÈÞ´ëÆù ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.mobile3.focus();
		return false;
  }  

  return true;	
}







function oneShutJoinCheck(aform){
	if(goShutPreCheck(aform)){
		document.aform.submit();
	}	
}	

function goShutPreCheck(aform){
	if(aform.user_name.value == ""){
		window.alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		aform.user_name.focus();
		return false;
  } 
  
	if(aform.userId.value == ""){
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		aform.userId.focus();
		return false;
  }  
     
 	if(aform.dupChecked.value == ""){
		window.alert("¾ÆÀÌµð Áßº¹°Ë»ç¸¦ ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		aform.dupChecked.focus();
		return false;
  }  

	if(aform.passwd.value == ""){
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		aform.passwd.focus();
		return false;
  }  

	if(aform.passwd.value != aform.passwdRe.value){
		window.alert("ºñ¹Ð¹øÈ£¿Í ºñ¹Ð¹øÈ£ È®ÀÎÀÌ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
		aform.passwd.focus();
		return false;
  }  

	if(aform.OTP.value.length != 6){
		window.alert("ÀÎÁõ¹øÈ£¸¦ È®ÀÎÇÏ¼¼¿ä");
		aform.OTP.focus();
		return false;
  }  

	return true;
}

function oneShutJoinCheck2(aform){
	if(goShutPreCheck2(aform)){
		document.aform.submit();
	}	
}	




function oneShutJoinCheck3(aform,tmode){

	if(aform.user_name.value == ""){
		window.alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		aform.user_name.focus();
		return false;
	}	

	var uid = aform.userId.value;
	var upw = aform.passwd.value;
	var rupw = aform.rePasswd.value;
	if (uid.length < 4 || uid.length > 12) {
		alert("¾ÆÀÌµð´Â 4±ÛÀÚ ÀÌ»ó, 12±ÛÀÚ ÀÌÇÏÀÔ´Ï´Ù.");
		aform.userId.focus();
		return false;
	}
	
	for (i = 0; i < uid.length; i++) {
		if (uid.charAt(i) >= '0' && uid.charAt(i) <= '9')
			continue;
		else if (uid.charAt(i) >= 'a' && uid.charAt(i) <= 'z')
			continue;
		else if (uid.charAt(i) >= 'A' && uid.charAt(i) <= 'Z')
			continue;
		else if (uid.charAt(i) == '_' || uid.charAt(i) == '-')
			continue;
		else {			
			alert("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 4ÀÚ ÀÌ»ó 12ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Å ÈÄ ¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä.");
			aform.userId.focus();
			return false;
		}
	}
	
	if (uid.charAt(0) == '_' || uid.charAt(0) == '-') {
		alert("_ ¿Í - ¹®ÀÚ´Â Ã¹±ÛÀÚ·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n¾ÆÀÌµð¸¦ ´Ù½Ã ÀÔ·ÂÇÏ½Å ÈÄ ¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä.");
		aform.userId.focus();
		return false;
	}

	if ( (uid.length < 4)|| (uid.length > 12) ){
		alert ("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 4ÀÚ ÀÌ»ó 12ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Å ÈÄ ¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä.");
		aform.userId.focus();
		return false;
	}

	if(!aform.passwd.value){
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		aform.passwd.focus();
		return false;
	}


	for (i = 0; i < upw.length; i++) {
		if (upw.charAt(i) >= '0' && upw.charAt(i) <= '9')
			continue;
		else if (upw.charAt(i) >= 'a' && upw.charAt(i) <= 'z')
			continue;
		else if (upw.charAt(i) >= 'A' && upw.charAt(i) <= 'Z')
			continue;
		else if (upw.charAt(i) == '_' || upw.charAt(i) == '-')
			continue;
		else {			
			alert("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			aform.passwd.focus();
			return false;
		}
	}
	
	if ( (upw.length < 6)|| (upw.length > 8) ){
		alert ("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		aform.passwd.focus();
		return false;
	}



	for (i = 0; i < rupw.length; i++) {
		if (rupw.charAt(i) >= '0' && rupw.charAt(i) <= '9')
			continue;
		else if (rupw.charAt(i) >= 'a' && rupw.charAt(i) <= 'z')
			continue;
		else if (rupw.charAt(i) >= 'A' && rupw.charAt(i) <= 'Z')
			continue;
		else if (rupw.charAt(i) == '_' || rupw.charAt(i) == '-')
			continue;
		else {			
			alert("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ºñ¹Ð¹øÈ£ È®ÀÎ¶õ¿¡ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			aform.rePasswd.focus();
			return false;
		}
	}
	
	if ( (rupw.length < 6)|| (rupw.length > 8) ){
		alert ("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ºñ¹Ð¹øÈ£ È®ÀÎ¶õ¿¡ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		aform.rePasswd.focus();
		return false;
	}
	
	if(aform.passwd.value || aform.rePasswd.value){
		if(!aform.passwd.value || !aform.rePasswd.value){
			window.alert('ºñ¹Ð¹øÈ£ È®ÀÎ ¶õ¿¡ ÀÖ´Â ¾ÏÈ£±îÁö ¸ðµÎ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			if(!aform.passwd.value){
				aform.passwd.focus();
			}else{
				aform.rePasswd.focus();
			}
			return false;
		}
		if(aform.passwd.value != aform.rePasswd.value){
			window.alert('ºñ¹Ð¹øÈ£¶õ °ú ºñ¹Ð¹øÈ£ È®ÀÎ¶õÀÇ ¾ÏÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÇÑ¹ø ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			aform.passwd.focus();
			return false;
		}
	}
 	
 	if(aform.email_id.value.length == ""){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		aform.email_id.focus();
		return false;
	} 

	if(aform.selEmail.value == "def"){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		aform.selEmail.focus();
		return false;
	}  

	if(aform.selEmail.value == ""){
		if(aform.emailFooter.value.length < 1){
			window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
			aform.email_id.focus();
			return false;
		}
	}
	
	if(!aform.zipCode1.value || !aform.zipCode2.value){
		window.alert('¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		if(!aform.zipCode1.value){
			aform.zipCode1.focus();
		}else{
			aform.zipCode2.focus();
		}
		return false;
	}

	if(!aform.addr1.value || !aform.addr2.value){
		window.alert('ÁÖ¼Ò¸¦ ¸ðµÎ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		if(!aform.addr1.value){
			aform.addr1.focus();
		}else{
			aform.addr2.focus();
		}
		return false;
	}

 
	if(!jumin_check(aform.iden1.value + aform.iden2.value)){
		window.alert('ÁÖ¹Î¹øÈ£¸¦ ´Ù½Ã ÇÑ¹ø È®ÀÎÇØ ÁÖ¼¼¿ä.');
		if(!aform.iden1.value){
			aform.iden1.focus();
			return false;
		}else{
			aform.iden2.focus();
			return false;
		}
	}
	
	var chkPan = "";
	
	for(var i = 0;i < aform.telecom.length;i++){
		if(aform.telecom[i].checked == true){
			chkPan = "checked";
		}
	}


	if(aform.mobile2.value.length == ""){
		window.alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		aform.mobile2.focus();
		return false;
	}

	if(aform.mobile3.value.length == ""){
		window.alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		aform.mobile3.focus();
		return false;
	}


	if(Number(tmode) >= 1){
		if(!aform.OTP.value || aform.OTP.value == ""){
			window.alert("ÀÎÁõ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			aform.OTP.focus();
			return false;
		}		
	}

	if(chkPan == ""){
		window.alert("ÀÌµ¿Åë½Å»ç¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
		aform.telecom[0].focus();
		return false;
	}


	if(aform.dupChecked.value != "checked"){
		window.alert("¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØ ÁÖ¼¼¿ä.");
		aform.userId.focus();
		return false;
	}    


	if(aform.UserYN[0].checked != true){
		window.alert("ÀÌ¿ë¾à°ü¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;
	}  
	aform.submit();
}	




function oneShutJoinCheck4(aform){
	if(aform.ServerInfo.value == ""){
		window.alert("¿ì¼± ÈÞ´ëÆù ÀÎÁõÀ» ¹ÞÀ¸¼Å¾ß ÇÕ´Ï´Ù.");
		aform.iden1.focus();
		return false;
  }	

	if(aform.OTP.value.length != 6){
		window.alert("ÀÎÁõ¹øÈ£¸¦ È®ÀÎÇÏ¼¼¿ä");
		aform.OTP.focus();
		return false;
  }

	if(aform.UserYN[0].checked != true){
		window.alert("Á¤È¸¿ø ÀüÈ¯À» ¿¹ ·Î ¼±ÅÃÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;
  } 
	aform.submit();
}




function modiChk(form){

	var chkPan = "";	

	if(!form.birthYear.value || !form.birthMonth.value || !form.birthDay.value){
		window.alert("»ý³â¿ùÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		if(!form.birthYear.value){
			form.birthYear.focus();
		}else if(!form.birthMonth.value){
			form.birthMonth.focus();
		}else{
			form.birthDay.focus();
		}
		return false;
	}
	
	for(var i = 0;i < form.birthPan.length;i++){
		if(form.birthPan[i].checked == true){
			chkPan = "checked";
		}
	}

	if(chkPan == ""){
		window.alert("¾ç·Â,À½·ÂÁß ÇÏ³ª¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
		form.birthPan[0].focus();
		return false;
	}
	
	if(form.mobile2.value.length == ""){
		window.alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.mobile2.focus();
		return false;
	}

	if(form.mobile3.value.length == ""){
		window.alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.mobile3.focus();
		return false;
	}
	
	if(!form.zipCode1.value || !form.zipCode2.value){
		window.alert('¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		if(!form.zipCode1.value){
			form.zipCode1.focus();
		}else{
			form.zipCode2.focus();
		}
		return false;
	}

	if(!form.addr1.value || !form.addr2.value){
		window.alert('ÁÖ¼Ò¸¦ ¸ðµÎ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		if(!form.addr1.value){
			form.addr1.focus();
		}else{
			form.addr2.focus();
		}
		return false;
	}
	
	if(form.email_id.value.length == ""){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		form.email_id.focus();
		return false;
	} 

	if(form.selEmail.value == "def"){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		form.selEmail.focus();
		return false;
	}  

	if(form.selEmail.value == ""){
		if(form.emailFooter.value.length < 1){
			window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
			form.email_id.focus();
			return false;
		}
	}
	
	chkPan = "";	
	for(var i = 0;i < form.emailRec.length;i++){
		if(form.emailRec[i].checked == true){
			chkPan = "checked";
		}
	}
	
	if(chkPan == ""){
		window.alert("ÀÌ¸ÞÀÏ ¼ö½Å¿©ºÎ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
		form.emailRec[0].focus();
		return false;
	}
	
/*	

	if(form.chgPasswd.value || form.chgRePasswd.value){
		if(!form.chgPasswd.value || !form.chgRePasswd.value){
			window.alert('º¯°æÇÏ½Ã°íÀÚ ÇÏ´Â ¾ÏÈ£¸¦ ¸ðµÎ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			if(!form.chgPasswd.value){
				form.chgPasswd.focus();
			}else{
				form.chgRePasswd.focus();
			}
			return false;
		}
		if(form.chgPasswd.value != form.chgRePasswd.value){
			window.alert('ºñ¹Ð¹øÈ£¶õ °ú ºñ¹Ð¹øÈ£ È®ÀÎ¶õÀÇ ¾ÏÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÇÑ¹ø ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			form.chgRePasswd.focus();
			return false;
		}
	}


	var upw = form.chgPasswd.value;
	var rupw = form.chgRePasswd.value;

	if(upw != '' || rupw != ''){

		for (i = 0; i < upw.length; i++) {
			if (upw.charAt(i) >= '0' && upw.charAt(i) <= '9')
				continue;
			else if (upw.charAt(i) >= 'a' && upw.charAt(i) <= 'z')
				continue;
			else if (upw.charAt(i) >= 'A' && upw.charAt(i) <= 'Z')
				continue;
			else if (upw.charAt(i) == '_' || upw.charAt(i) == '-')
				continue;
			else {			
				alert("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
				form.chgPasswd.focus();
				return false;
			}
		}
		
		if ( (upw.length < 6)|| (upw.length > 8) ){
			alert ("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			form.chgPasswd.focus();
			return false;
		}


		for (i = 0; i < rupw.length; i++) {
			if (rupw.charAt(i) >= '0' && rupw.charAt(i) <= '9')
				continue;
			else if (rupw.charAt(i) >= 'a' && rupw.charAt(i) <= 'z')
				continue;
			else if (rupw.charAt(i) >= 'A' && rupw.charAt(i) <= 'Z')
				continue;
			else if (rupw.charAt(i) == '_' || rupw.charAt(i) == '-')
				continue;
			else {			
				alert("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ºñ¹Ð¹øÈ£ È®ÀÎ¶õ¿¡ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
				form.chgRePasswd.focus();
				return false;
			}
		}
		
		if ( (rupw.length < 6)|| (rupw.length > 8) ){
			alert ("¿µ¹®, ¼ýÀÚ Á¶ÇÕ 6ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏ·Î ¿øÇÏ½Ã´Â ¾ÏÈ£¸¦ ºñ¹Ð¹øÈ£ È®ÀÎ¶õ¿¡ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			form.chgRePasswd.focus();
			return false;
		}

	}


	if(!form.passwd.value){
		window.alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.passwd.focus();
		return false;
	}
*/
	form.submit();
}	




function goShutPreCheck2(aform){

	/*
	if(aform.ServerInfo.value == ""){
		window.alert("¿ì¼± ÈÞ´ëÆù ÀÎÁõÀ» ¹ÞÀ¸¼Å¾ß ÇÕ´Ï´Ù.");
		aform.iden1.focus();
		return false;
  }	
	if(aform.userName.value == ""){
		window.alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		aform.userName.focus();
		return false;
  }

	if(!jumin_check(aform.juminCode1.value + aform.juminCode2.value)){
		window.alert('ÁÖ¹Î¹øÈ£¸¦ ´Ù½Ã ÇÑ¹ø È®ÀÎÇØ ÁÖ¼¼¿ä.');
		if(!form.juminCode1.value){
			form.juminCode1.focus();
			return false;
		}else{
			form.juminCode2.focus();
			return false;
		}
	}

	if(aform.OTP.value.length != 6){
		window.alert("ÀÎÁõ¹øÈ£¸¦ È®ÀÎÇÏ¼¼¿ä");
		aform.OTP.focus();
		return false;
  }
	if(aform.email_id.value.length == ""){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		aform.email_id.focus();
		return false;
  } 
	if(aform.selEmail.value == "def"){
		window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		aform.selEmail.focus();
		return false;
  }  
	if(aform.selEmail.value == ""){
		if(aform.emailFooter.value.length < 1){
		  window.alert("ÀÌ¸ÞÀÏÀ» È®ÀÎÇÏ¼¼¿ä");
		  aform.email_id.focus();
		  return false;
		}
  }    
	*/
	if(aform.dupChecked.value == ""){
		window.alert("ÀÌ¸ÞÀÏ Áßº¹È®ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;		
	}

	if(aform.UserYN[0].checked != true){
		window.alert("ÀÌ¿ë¾à°ü¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;
  } 
	aform.mode.value = 'proc';
	return true;
}

function callSearchTicket(obj){
	location.href = '../_mypage/?mode=phoneTicket&year='+obj.options[obj.selectedIndex].value;	
}

function enterEvent(){
	if(event.keyCode==13){
	  document.rform.submit();
	}
}

function enterEvent2(){
	if(event.keyCode==13){
	  check_makeId(document.aform);
	}
}


function goService(sid,add){
	var service_page = '';
	switch(sid){
		case 501:
			service_page = "/_auction/detail.xg?sa_num=" + (('undefined' != typeof(add)) ? add : '');	//°æ¸Å µðÅ×ÀÏ ÆäÀÌÁö
			break;
		case 503:
			service_page = "/_auction/detail2.xg?sa_num=" + (('undefined' != typeof(add)) ? add : '');	//°æ¸Å µðÅ×ÀÏ ÆäÀÌÁö
			break;
		case 504:
			service_page = "/_auction/detailPreview.xg?sa_num=" + (('undefined' != typeof(add)) ? add : '');	//ÁøÇà ¿¹Á¤ÀÎ °æ¸Å ¹°Ç° º¸±â
			break;
		case 507:
			service_page = "/_auction/biddingRequest.xg?mode=bidding&sa_num=" + (('undefined' != typeof(add)) ? add : '');			//°æ¸Å ÀÌº¥Æ® Âü¿©ÇÏ±â
			break;
	}

	location = service_page;
}


function viewDetailYakwan(){
	window.open("/popup/detail_yakwan.xg","yakwan","width=610,height=660,left=0,top=0,scrollbars=yes,resizable=no");
}





function my_scroll(){

	this.row_height = 0;
	this.row_width = 0;
	this.now_bottom = 0;
	this.next_bottom = 0;
	this.now_left = 0;
	this.next_left = 0;
	this.act_layer = "next";
	this.layer_name = "";
	this.row_name = "";
	this.dirPan = "";

	this.exeCnt = 0;
	this.speed = 5;
	this.pausetime = 100;

	this.startPoint = 0;
	this.nextPoint = 0;
	this.next_ord = 1;
	this.ord = 1;
	this.mord = 0;
	this.pauseByMouse = false;
	this.pausePan = true;
	this.pauseCnt = 1;

	this.scr_main = my_scr;
	this.chg_layer = change_layer;
	this.scr_init = ready_scr;

}


function my_scr(){
	if(this.pausePan == true || this.pauseByMouse == true){
		if(this.pauseByMouse == false){
			this.pauseCnt++;
			if(this.pauseCnt == this.pausetime){
				this.chg_layer();
				this.pauseCnt = 1;
				this.pausePan = false;
				this.exeCnt = 0;
			}
		}
	}else{
		this.exeCnt++;	
		switch(this.dirPan){
			case "b2t":
				this.now_bottom--;
				this.next_bottom--;
			break;
			case "t2b":
				this.now_bottom++;
				this.next_bottom++;
			break;
			case "r2l":
				this.now_left--;
				this.next_left--;
			break;
			case "l2r":
				this.now_left++;
				this.next_left++;					
			break;
		}
		
		if(this.dirPan == "b2t" || this.dirPan == "t2b"){
			eval(this.layer_name + "_now").style.top = this.now_bottom;
			eval(this.layer_name + "_next").style.top = this.next_bottom;
			// Å×½ºÆ®¿ë Ä«¿îÆ®
			//myc.innerHTML = "su : " + this.exeCnt;	
			if(this.exeCnt == this.row_height){			
				this.pausePan = true;
			}
		}else{
			eval(this.layer_name + "_now").style.left = this.now_left;
			eval(this.layer_name + "_next").style.left = this.next_left;
			if(this.exeCnt == this.row_width){								
				this.pausePan = true;
			}
		}
	}		

}


function change_layer(){	

	this.exeCnt = 0;		
	this.ord = this.next_ord;
	this.next_ord++;
	// ´ÙÀ½ Ãâ·Â
	if(this.next_ord > this.mord){
		this.next_ord = 1;
	}		
	if(this.act_layer == "next"){
		this.act_layer = "now";					
		if(this.dirPan == "b2t" || this.dirPan == "t2b"){
			if(this.dirPan == "b2t"){
				this.nextPoint = this.row_height - this.row_height;	
			}else{
				this.nextPoint = this.row_height - (this.row_height * 3);
			}
			this.next_bottom = this.nextPoint;		
			eval(this.layer_name + "_next").innerHTML = eval(this.row_name + this.next_ord).innerHTML;
			eval(this.layer_name + "_next").style.top = this.next_bottom;
		}else{
			if(this.dirPan == "r2l"){
				this.nextPoint = Number(this.row_width);	
			}else{
				this.nextPoint = this.row_width - (this.row_width * 2);
			}			
			this.next_left = this.nextPoint;		
			eval(this.layer_name + "_next").innerHTML = eval(this.row_name + this.next_ord).innerHTML;
			eval(this.layer_name + "_next").style.left = this.next_left;
		}
	}else{			
		
		if(this.dirPan == "b2t" || this.dirPan == "t2b"){
			if(this.dirPan == "b2t"){
				this.nextPoint = this.row_height;		
			}else{
				this.nextPoint = this.row_height - (this.row_height * 2);
			}
			this.act_layer = "next";
			this.now_bottom = this.nextPoint;
			eval(this.layer_name + "_now").innerHTML = eval(this.row_name + this.next_ord).innerHTML;
			eval(this.layer_name + "_now").style.top = this.next_bottom;
		}else{
			if(this.dirPan == "r2l"){
				this.nextPoint = this.row_width;		
			}else{
				this.nextPoint = this.row_width - (this.row_width * 2);
			}
			this.act_layer = "next";
			this.now_left = this.nextPoint;
			eval(this.layer_name + "_now").innerHTML = eval(this.row_name + this.next_ord).innerHTML;
			eval(this.layer_name + "_now").style.left = this.next_left;
		}
	}

}

function ready_scr(twidth,theight,tmord,tlayer_name,trow_name,tdir){		

	this.mord = tmord;
	this.row_height = theight;
	this.row_width = twidth;
	this.layer_name = tlayer_name;
	this.row_name = trow_name;

	if(tdir == "r2l" || tdir == "l2r"){
		this.now_left = 0;		
		if(tdir == "r2l"){
			this.next_left = Number(twidth) + Number(twidth);
		}else{
			this.next_left = twidth - (twidth * 2);
		}	
		this.startPoint = 0;
		this.nextPoint = this.next_left;
		this.exeCnt = 0;				
		eval(this.layer_name + "_now").style.left = this.now_left;	
	}else{
		this.now_bottom = 0;
		this.next_bottom = theight - (theight * 3);
		this.startPoint = 0;
		this.nextPoint = this.next_bottom;
		this.exeCnt = 0;				
		eval(this.layer_name + "_now").style.top = this.now_bottom;						
	}
	eval(this.layer_name + "_now").innerHTML = eval(this.row_name + this.ord).innerHTML;
}


//»óÇ° ÀÌ¹ÌÁö È®´ëº¸±â..
function viewPhoto(photo){
	openwindow('viewPhoto', "http://www.xgclub.com/global/imageWin.xg?photo=" + photo, 100, 100, 0, 1, 1);
}

//»õ·Î¿îÃ¢À» »ý¼º..
function openwindow(name, url, width, height, scrollbar, resizable, status) {
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	status_str = status ? 'yes' : 'no';

	return window.open(url, name, 'width='+width+',height='+height+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',status='+status_str+',copyhistory=yes');
}



function myTimer(tday,thour,tmin,tsec){
	this.mTitle = "";
	this.dday = tday;
	this.dhour = thour;
	this.dmin = tmin;
	this.dsec = tsec;
	this.dayId = "";
	this.hourId = "";
	this.minId = "";
	this.secId = "";

	this.obj_procTime = procTime;
}

function procTime(){	
	var tmpDay;
	var tmpHour;
	var tmpMin;
	var tmpSec;
	if(this.dsec == 0){
		this.dsec = 59;
		if(this.dmin == 0){
			this.dmin = 59;
			if(this.dhour == 0){
				this.dhour = 23;
				if(this.dday == 0){
					//alert(this.mTitle + '°¡ Á¾·áµÇ¾ú½À´Ï´Ù.');
					
					//document.location.reload();	//´ÙÀ½È¸Â÷ °æ¸Å¸¦ º¸±â À§ÇØ¼­ ÇöÀç ÆäÀÌÁö¸¦ ´Ù½Ã ºÒ·¯¿Â´Ù..
				}else{
					--this.dday;
				}
			}else{
				--this.dhour;
			}
		}else{
			--this.dmin;
		}
	}else{
		--this.dsec;
	}

	if(this.dday < 10){
		tmpDay = '0' + this.dday;
	}else{
		tmpDay = this.dday;
	}
	eval(this.dayId).innerHTML = tmpDay;

	if(this.dhour < 10){
		tmpHour = '0' + this.dhour;
	}else{
		tmpHour = this.dhour;
	}
	eval(this.hourId).innerHTML = tmpHour;

	if(this.dmin < 10){
		tmpMin = '0' + this.dmin;
	}else{
		tmpMin = this.dmin;
	}
	eval(this.minId).innerHTML = tmpMin;

	if(this.dsec < 10){
		tmpSec = '0' + this.dsec;
	}else{
		tmpSec = this.dsec;
	}
	eval(this.secId).innerHTML = tmpSec;		
}


//¿ìÆí¹øÈ£ ÁÖ¼ÒÃ£±â..
function ZipNo(formName) {
	openwindow('postCode', '../popup/postCode.xg?formName='+ formName, 417, 200, 1, 1, 1);
}


//ÆäÀÌÁö ÀÌµ¿..
function goPage(page){
	if('undefined' != typeof(document.searchForm)){
		document.searchForm.page.value = page;
		document.searchForm.submit();
	}
}


function chkPass(form){
	if(!form.passwd.value){
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.passwd.focus();
		return false;
	}
}


function mailFormChk(formName){
	var form = eval("document." + formName);
	if(!chkRadioChk(form.emailCate)){
		window.alert('¹®ÀÇ ºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		form.emailCate[0].focus();
		return false;
	}

	if(!form.email.value || (blank_check(form.email.value) == '')){
		window.alert('ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.email.focus();
		return false;
	}
	
	if(!form.userName.value || (blank_check(form.userName.value) == '')){
		window.alert('¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.userName.focus();
		return false;
	}

	if(!form.tele.value || (blank_check(form.tele.value) == '')){
		window.alert('¿¬¶ôÃ³¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.tele.focus();
		return false;
	}

	if(!form.subject.value || (blank_check(form.subject.value) == '')){
		window.alert('Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.subject.focus();
		return false;
	}

	if(!form.content.value || (blank_check(form.content.value) == '')){
		window.alert('³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.content.focus();
		return false;
	}
	form.submit();

}	

function chgAucMenu(){
	if(aucMenu.style.display == "block"){
		aucMenu.style.display = "none";
	}else{
		aucMenu.style.display = "block";
	}
}

function showAucMenu(){
	aucMenu.style.display = "block";
}

function hideAucMenu(){
	aucMenu.style.display = "none";
}

function chkRadioChk(form){
	var i = 0;
	var chkPan = "";
	for(i = 0;i < form.length;i++){
		if(form[i].checked == true){
			return true;
		}
	}
	return false;		
}



function cancl(){
	location.href="/";
  //reset();
}


function emailAsk(fm){
 if(emailAskCheck(fm)){
 	  fm.submit();
 }
}

function emailAskCheck(fm){

	if(!chkRadioChk(fm.field)){
		window.alert('¹®ÀÇ ºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		fm.field[0].focus();
		return false;
	}
	if(fm.email.value == ""){
	  alert("¼ö½Å¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.email.focus();
	  return false;
	}
	if(fm.userName.value == ""){
	  alert("°í°´´ÔÀÇ ¼ºÇÔÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.userName.focus();
	  return false;
	}
	if(fm.tele.value == ""){
	  alert("¿¬¶ô°¡´ÉÇÑ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.tele.focus();
	  return false;
	}
	if(fm.subject.value == ""){
	  alert("±Û Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.subject.focus();
	  return false;
	}
	if(fm.content.value == ""){
	  alert("±Û ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.content.focus();
	  return false;
	}
	return true;		
}


function payAsk(fm){
 if(payAskCheck(fm)){
 	  fm.submit();
 }
}

function payAskCheck(fm){

	if(!chkRadioChk(fm.field)){
		window.alert('¹®ÀÇ ºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		fm.field[0].focus();
		return false;
	}
	if(fm.email.value == ""){
	  alert("¼ö½Å¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.email.focus();
	  return false;
	}
	if(fm.userName.value == ""){
	  alert("°í°´´ÔÀÇ ¼ºÇÔÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.userName.focus();
	  return false;
	}
	if(fm.tele.value == ""){
	  alert("¿¬¶ô°¡´ÉÇÑ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.tele.focus();
	  return false;
	}
	if(fm.subject.value == ""){
	  alert("±Û Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.subject.focus();
	  return false;
	}
	if(fm.content.value == ""){
	  alert("±Û ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.content.focus();
	  return false;
	}
	return true;		
}


function proposalAsk(fm){
 if(proposalAskCheck(fm)){
 	  fm.submit();
 }
}

function proposalAskCheck(fm){

	if(!chkRadioChk(fm.field)){
		window.alert('¹®ÀÇ ºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		fm.field[0].focus();
		return false;
	}
	if(fm.email.value == ""){
	  alert("¼ö½Å¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.email.focus();
	  return false;
	}
	if(fm.userName.value == ""){
	  alert("°í°´´ÔÀÇ ¼ºÇÔÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.userName.focus();
	  return false;
	}
	if(fm.tele.value == ""){
	  alert("¿¬¶ô°¡´ÉÇÑ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.tele.focus();
	  return false;
	}
	if(fm.subject.value == ""){
	  alert("±Û Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.subject.focus();
	  return false;
	}
	if(fm.content.value == ""){
	  alert("±Û ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.content.focus();
	  return false;
	}
	return true;		
}


function oneAsk(fm){
 if(oneAskCheck(fm)){
 	  fm.submit();
 }
}

function oneAskCheck(fm){

	if(fm.subject.value == ""){
	  alert("±Û Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.subject.focus();
	  return false;
	}
	if(fm.content.value == ""){
	  alert("±Û ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.content.focus();
	  return false;
	}
	return true;		
}


function tkAsk(fm){
 if(tkAskCheck(fm)){
 	  fm.submit();
 }
}

function tkAskCheck(fm){
	if(fm.email.value == ""){
	  alert("¼ö½Å¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.email.focus();
	  return false;
	}
	if(fm.userName.value == ""){
	  alert("°í°´´ÔÀÇ ¼ºÇÔÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.userName.focus();
	  return false;
	}
	if(fm.tele.value == ""){
	  alert("¿¬¶ô°¡´ÉÇÑ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.tele.focus();
	  return false;
	}
	if(fm.subject.value == ""){
	  alert("±Û Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.subject.focus();
	  return false;
	}
	if(fm.content.value == ""){
	  alert("±Û ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
	  fm.content.focus();
	  return false;
	}
	return true;		
}
/*
function callMrankAcc(tc,tp){
  if(tc == null || tc == '') tc = '';
  var tpl = "";
  if(tp != null) tpl = "&type="+tp;
	var mra=window.open("/popup/mRankAcc.xg?mp=" + tc + tpl,"mra","width=570,height=770,top=0,left=0,scrollbars=yes");
	mra.focus();
}
*/
function callMrankAcc(tc,tp,month,Url){
  
  var tpl = "";
  var tpm = "";
  var url = "";

  if(tc == null || tc == '') tc = '';
  if(tp != null) tpl = "&type="+tp;
  if(Url != null|| Url != undefined) url = "&url="+Url;
  if(month != null || month != undefined)  var tpm = "&month="+month;

  var mra=window.open("/popup/mRank.xg?mp=" + tc + tpl + tpm + url,"mra","width=570,height=770,top=0,left=0,scrollbars=no");
  mra.focus();
}

function callMrankInfo(tc){
	var mri = window.open("/popup/mRankInfo.xg?mp=" + tc,"mri","width=400,height=460,top=0,left=0,scrollbars=no");
	mri.focus();
}

function popUpPage1(){
	window.open("/_info/popUpAlert1.xg","poppg1","width=570,height=568,top=0,left=0,scrollbars=yes");
}
function popUpPage10(){
	window.open("/_info/popUpAlert10.xg","poppg1","width=550,height=568,top=0,left=0,scrollbars=no");
}

function popUpPage2(){
	window.open("../_info/popUpAlert2.xg","poppg2","width=406,height=274,top=200,left=400,scrollbars=no");
}

function popUpPage3(){
	window.open("/popup/join/pop_privacy.xg","poppg3","width=720,height=568,top=0,left=0,scrollbars=yes");
}

function popupMajorInfo(){
	window.open("../_info/popUpAlert3.xg","poppg3","width=575,height=730,top=100,left=400,scrollbars=yes");
}
function popUpPage4(){
	window.open("http://test.nowchance.com/company/pop_individual.php","poppg4","width=620, height=568,top=0,left=0,scrollbars=yes");
}

function upgradeConfirm(tc){
	if(tc == 1){
		if(confirm("ÀÌ¹Ì ¹«·áÈ¸¿ø ÀÌ½Ê´Ï´Ù.\n\n Á¤È¸¿øÀ¸·Î ÀüÈ¯ÇÏ½Ã°Ú½À´Ï±î?")){
			callMrankAcc(1);
		}
	}
	else if(tc == 3){
		if(confirm("ÀÌ¹Ì ÇÁ¸®¹Ì¾ö È¸¿øÀÌ½Ê´Ï´Ù.\n\n ·Î¾âÈ¸¿øÀ¸·Î ÀüÈ¯ÇÏ½Ã°Ù½À´Ï±î?")){
			callMrankAcc(3);
		}
	}
	else{
		if(confirm("ÀÌ¹Ì Á¤È¸¿ø ÀÌ½Ê´Ï´Ù.\n\n ÇÁ¸®¹Ì¾ö È¸¿øÀ¸·Î ÀüÈ¯ÇÏ½Ã°Ú½À´Ï±î?")){
			callMrankAcc(2);
		}	  
	}
}

function upgradeConfirm2(){
		if(confirm("ÇÃ·¯½º È¸¿ø Àü¿ë¼­ºñ½ºÀÔ´Ï´Ù.\n\nÇÃ·¯½º È¸¿øÀ¸·Î ÀüÈ¯ÇÏ½Ã°Ú½À´Ï±î?")){
			callMrankAcc(1);
		}
}

function moveLoginPage(){
		alert("È¸¿ø Àü¿ë¼­ºñ½ºÀÔ´Ï´Ù.\n\n ·Î±×ÀÎ ÇØÁÖ¼¼¿ä.");
		opener.location.href='../_info/?md=login&cate=mbinfo';
}

//////////////////¼ºÀÎÀÎÁõÀ» À§ÇÑ ÇÔ¼ö ½ÃÀÛ///////////////////
function chkAdult(nmbr){
	  var fm = document.authCheck;
	
		if(chkAdultDetail_1(fm)){
			  if(chkAdultDetail_2(fm)){
			  	 document.authCheck.adultChk.value = "ok";
			     document.authCheck.submit();
			  }
		}
}

function chkAdultDetail_1(fm){

	if(fm.chkName.value == ""){
		error(fm.chkName,'°í°´´ÔÀÇ ÀÌ¸§À» È®ÀÎ ÇÏ¼¼¿ä.');
	  return false;
	}
	if ( StrLen(fm.chkIden1.value) < 6 ) {
		error(fm.iden0,'ÁÖ¹Îµî·Ï ¹øÈ£ ¾ÕÀÚ¸®¸¦ È®ÀÎ ÇÏ¼¼¿ä.');
		return false;
	} 
	if ( StrLen(fm.chkIden2.value) < 7 ) {
		error(fm.iden1,'ÁÖ¹Îµî·Ï ¹øÈ£ µÞÀÚ¸®¸¦ È®ÀÎ ÇÏ¼¼¿ä.');
		return false;
	}	  
	if ( Jumin_chk(fm.chkIden1.value+fm.chkIden2.value) ) {
		error(fm.iden0,'À¯È¿ÇÏÁö ¾ÊÀº ÁÖ¹Î¹øÈ£ ÀÔ´Ï´Ù.');
		return false;
	}
	return true;
}

// ¹®ÀÚ¿­ ±æÀÌ ±¸ÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù.
function StrLen(arg_str) {
	var j = 0;
	var tempStr;
	var tempStr2;
	for(var i = 0; i < arg_str.length; i++ ) {
	 tempStr = arg_str.charCodeAt(i);
	 tempStr2 = tempStr.toString();
	 if(tempStr2.length >= 5) {
		 j++;
	 }
	}
	return i+j;
}

// ÁÖ¹Îµî·Ï¹øÈ£ À¯È¿¼º Ã¼Å© ÇÔ¼öÀÔ´Ï´Ù.
function Jumin_chk(it) {
	IDtot = 0;
	IDAdd='234567892345';

	for(i=0;i<12;i++) {
		IDtot=IDtot+parseInt(it.substring(i,i+1))*parseInt(IDAdd.substring(i,i+1));
	}
	IDtot=11-(IDtot%11);

	if(IDtot==10) {
		IDtot=0;
	}
	else if(IDtot==11){
		IDtot=1;
	}
	if(parseInt(it.substring(12,13))!=IDtot) {
		return true;
	} 
}

function error (elem,text) { 
	window.alert(text); 
	elem.select(); 
	elem.focus(); 
}

function chkAdultDetail_2(fm){
	now = new Date();
	userIden1 = fm.chkIden1.value;
	userIden2 = fm.chkIden2.value;
	nowYear = now.getYear();

	if(userIden2.substring(0,1) == '1' || userIden2.substring(0,1) == '2'){
    myBirth = Number('19'+userIden1.substring(0,2));
  }
  else{
    myBirth = Number('20'+userIden1.substring(0,2));
  }
  
  myAge = (nowYear-myBirth)+1;
  
  if(myAge < 20){
  	error(fm.chkName,'º» ¼­ºñ½º´Â ¼ºÀÎÀü¿ë ÄÁÅÙÃ÷ ÀÔ´Ï´Ù.');
  	fm.chkIden1.value = '';
  	fm.chkIden2.value = '';
  	return false;
  }
  return true;
}
/////////////////¼ºÀÎÀÎÁõÀ» À§ÇÑ ÇÔ¼ö Á¾·á///////////////////


function closeBidConfirm(flg){
	if(flg == 3){
		if(confirm("ÃæÀü¼Ò ÀÌ¿ëÀº ·Î±×ÀÎ ÀÌÈÄ¿¡ °¡´ÉÇÕ´Ï´Ù.\n\n·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?")){
		//	location.href = "../_info/?md=login&cate=mbinfo";
		}
	}	
  else if(flg == 4){
		alert("ÀÔÂûÀº ·Î±×ÀÎ ÀÌÈÄ¿¡ °¡´ÉÇÕ´Ï´Ù.");
		location.href = "../_info/?md=login&cate=mbinfo";
	}
  else if(flg == 9){
		if(confirm("  ÀÔÂûÀÌ ¸¶°¨µÈ »óÇ°ÀÔ´Ï´Ù.\n\nÁøÇàÁßÀÎ »óÇ°ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?")){
			location.href = "../_auction/auction.xg";
		}	
  }
  else{
		if(confirm("ÀÔÂûÀº ·Î±×ÀÎ ÀÌÈÄ¿¡ °¡´ÉÇÕ´Ï´Ù.\n\n·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?")){
		//	location.href = "../_info/?md=login&cate=mbinfo";
		}
	}
}

function jsWrite(src){
	document.write(src);
}

function myTimer2(tday,thour,tmin,tsec){
	this.mTitle = '';
	this.dday = tday;
	this.dhour = thour;
	this.dmin = tmin;
	this.dsec = tsec;
	this.dayId = '';
	this.hourId = '';
	this.minId = '';
	this.secId = '';

	this.obj_procTime2 = procTime2;
}

function procTime2(){
	var tmpDay;
	var tmpHour;
	var tmpMin;
	var tmpSec;
	if(this.dsec == 0){
		this.dsec = 59;
		if(this.dmin == 0){
			this.dmin = 59;
			if(this.dhour == 0){
				this.dhour = 23;
				if(this.dday == 0){
					alert(this.mTitle + '°¡ Á¾·áµÇ¾ú½À´Ï´Ù.');
					document.location.reload();	//´ÙÀ½È¸Â÷ °æ¸Å¸¦ º¸±â À§ÇØ¼­ ÇöÀç ÆäÀÌÁö¸¦ ´Ù½Ã ºÒ·¯¿Â´Ù..
				}else{
					--this.dday;
				}
			}else{
				--this.dhour;
			}
		}else{
			--this.dmin;
		}
	}else{
		--this.dsec;
	}

	if(this.dday < 10){
		tmpDay = '0' + this.dday;
	}else{
		tmpDay = this.dday;
	}
	eval(this.dayId).innerHTML = makeNumber2Image(tmpDay);
	//alert(tmpDay);
	if(this.dhour < 10){
		tmpHour = '0' + this.dhour;
	}else{
		tmpHour = this.dhour;
	}
	eval(this.hourId).innerHTML = makeNumber2Image(tmpHour);

	if(this.dmin < 10){
		tmpMin = '0' + this.dmin;
	}else{
		tmpMin = this.dmin;
	}
	eval(this.minId).innerHTML = makeNumber2Image(tmpMin);
}

function makeNumber2Image(num){
	var imgTag = '';
	var tmpStr = num.toString();
	
	for(var i=0; i<tmpStr.length; i++){
		imgTag = imgTag + "<img src='http://img.xgclub.com/images/auction/re_time_0" + tmpStr.charAt(i) + ".gif' width='12' height='16'>";
	}
	return imgTag;
}

function viewOldBidInfo(sa_num){
	var ow = openwindow('viewBidData_'+sa_num, "/_auction/viewOldBidInfo.xg?sa_num=" + sa_num, 404, 455, 0, 0, 1);
	ow.focus();
}

function viewBidInfo(sa_num){
	var ow = openwindow('viewBidInfo_'+sa_num, "/_auction/viewBidInfo.xg?sa_num=" + sa_num, 404, 455, 0, 0, 1);
	ow.focus();
}

function viewBidInfo2(sa_num){
	var ow = openwindow('viewBidInfo_'+sa_num, "/_auction/viewBidInfo.xg?infoPan=bidStat&sa_num=" + sa_num + "#sucAccount", 404, 455, 0, 0, 1);
	ow.focus();
}

function viewBidInfo3(sa_num){
	var ow= openwindow('viewBidInfo_'+sa_num, "/_auction/viewBidInfo.xg?mode=oldCheck&sa_num=" + sa_num + "&tsa_num=" + sa_num, 404 , 455 , 0 , 0 , 1);
}

function viewBidInfo4(sa_num){
	alert('ÀÔ·ÂµÈ °æ¸ÅÀÇ °ú°Å ÀÔÂû Á¤º¸°¡ ¾ø½À´Ï´Ù.\n\nÀÌ¹øÈ¸Â÷¿¡ Ã³À½ µî·ÏµÈ »óÇ°ÀÔ´Ï´Ù.');
}

function openChgPayInfo(){
	var ow = openwindow('payInfoForm', "/_mypage/changePayInfo.xg", 552, 400, 0, 1, 1);
	ow.focus();
}

function chkIden(){
	form = document.authCheck;
	if(!form.chkName.value || (blank_check(form.chkName.value) == '')){
		window.alert('°í°´´ÔÀÇ ¼ºÇÔÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		form.chkName.focus();
		return false;
	}
	if(!jumin_check(form.chkIden1.value + form.chkIden2.value)){
		window.alert('ÁÖ¹Î¹øÈ£¸¦ ´Ù½Ã ÇÑ¹ø È®ÀÎÇØ ÁÖ¼¼¿ä.');
		if(!form.chkIden1.value){
			form.chkIden1.focus();
			return false;
		}else{
			form.chkIden2.focus();
			return false;
		}
	}
	document.authCheck.adultChk.value = "ok";
	form.submit();
}

function chgsw(faqNum,faqSu){
	var i;
	for(i = 1;i < faqSu;i++){
		if(i == faqNum){
			if(eval("faq" + i).style.display == "block"){
				eval("faq" + i).style.display = "none";
			}else{
				eval("faq" + i).style.display = "block";
			}
		}else{
			eval("faq" + i).style.display = "none";
		}
	}
}

function cancelServiceStop(rtnUrl){
	if( confirm("¼­ºñ½ºÇØÁö ½ÅÃ»À» Ãë¼ÒÇÏ½Ã°Ú½À´Ï±î?") ){
		document.location.href='/_mypage/cancelServiceStop.xg?rtnUrl=' + rtnUrl;
	}
}

function findId_pop(){
  //window.open("/popup/findId.xg","fiBox","width=440,height=320,top=0,left=0,scrollbars=no");
  window.open("/popup/findId.xg","fiBox","width=440,height=331,top=0,left=0,scrollbars=no");
}

function findPw_pop(){
  //window.open("/popup/findPw.xg","fpBox","width=440,height=430,top=0,left=0,scrollbars=no");
  window.open("/popup/findPw.xg","fpBox","width=440,height=472,top=0,left=0,scrollbars=no");
}
/*function Login_pop(){
  var loginWin = window.open("/popup/popLogin.xg","flBox","width=441,height=457,top=0,left=0,scrollbars=no");
  loginWin.focus();
}
*/
function Login_pop(val,Url){
  var loginWin = window.open("/popup/popLogin.xg?move="+val+"&rtnUrl="+Url,"flBox","width=441,height=457,top=0,left=0,scrollbars=no");
  loginWin.focus();
}
function JJangdiskUrl(){
	window.open('http://www.jjangdisk.com/partner.php?partner_userid=xgclub','');
}

function changeMyMobile() {
	chgMUrl = "http://www.nowchance.com/_mypage/editMobileLayer.php";
	NewWindows(chgMUrl,'changeMyMobile','450','180','no','center');
}

// ÆË¾÷Ã¢ °ü·Ã
// 2008.07.01 Ãß°¡
var win=null; 
function NewWindows(mypage,myname,w,h,scroll,pos){ 
if(pos=='random'){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} 
if(pos=='center'){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} 
else if((pos!='center' && pos!='random') || pos==null){LeftPosition=0;TopPosition=0} 
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; 
win=window.open(mypage,myname,settings); 
if(win.focus){win.focus();}
}

function n_window(theURL,winName,features) {
  window.open(theURL,winName,features);
}