function urlBoxWindows2(url, target, wi, hi) {
	var lf = eval( (screen.availWidth/2) -(wi/2)); // get center position
	var tp = eval( (screen.availHeight/2)-(hi/2)); // get center position
	return window.open(url,target,'width='+wi+',height='+hi+',marginwidth=0,scrollbars=no,marginheight=0,resizable=no,statusbar=no,top='+tp+',left='+lf);
}

function urlBoxWindows2ws(url, target, wi, hi) {
	var lf = eval( (screen.availWidth/2) -(wi/2)); // get center position
	var tp = eval( (screen.availHeight/2)-(hi/2)); // get center position
	return window.open(url,target,'width='+wi+',height='+hi+',marginwidth=0,scrollbars=yes,marginheight=0,resizable=no,statusbar=no,top='+tp+',left='+lf);
}
function userid_check(type)
{
	var page="id_check.htm?type="+type;
	var win=urlBoxWindows2(page, "idcheck", 300,250);
	win.focus();
}

function pop_userid_check(type)
{
	var page="pop_idcheck.html?type="+type;
	var win=window.open(page, "idcheck", "width=320, height=180");
	win.focus();
}
function print_error(msg)
{
	alert(msg);
}


function check_hanmail(mail) //ÇÑ¸ÞÀÏÀ» ÀÔ·ÂÇß´ÂÁö Ã¼Å©...
{
	var hanmail=/hanmail.net/i;
	var daum = /daum.net/i;

	var hostname = mail.split("@");

	if((hostname[1].match(hanmail)) || (hostname[1].match(daum)))
		return 0;
	else
		return 1;
}


function check_mail(email) //¸ÞÀÏ Çü½Ä Ã¼Å©...
{
       var pattern = /^(.+)@(.+)$/;
       var atom = "\[^\\s\\(\\)<>#@,;:!\\\\\\\"\\.\\[\\]\]+";
       var word="(" + atom + "|(\"[^\"]*\"))";
       var user_pattern = new RegExp("^" + word + "(\\." + word + ")*$");
       var ip_pattern = /^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
       var domain_pattern = new RegExp("^" + atom + "(\\." + atom +")*$");

       var arr = email.match(pattern);
       if (!arr) return 0;
       if (!arr[1].match(user_pattern)) return 0;

       var ip = arr[2].match(ip_pattern);
       if (ip) {
              for (var i=1; i<5; i++) if (ip[i] > 255) return 0;
       }
       else {
              if (!arr[2].match(domain_pattern)) return 0;
              var domain = arr[2].match(new RegExp(atom,"g"));
              if (domain.length<2) return 0;
              if (domain[domain.length-1].length<2 || domain[domain.length-1].length>3)
                     return 0;
       }
       return 1;
}



function  check_phone_number(p1, p2, p3)
{
	var char=' ~!@#?$%^&*()=_-+`\'\"<>[]|\\{};:.,\/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        if(char.length >= 1)
        {
            for (var i=0; i<p1.length; i++)
            {
                if(char.indexOf(p1.substring(i,i+1))>0)
                {
                    return 0;
                }
            }


            for (var i=0; i<p2.length; i++)
            {
                if(char.indexOf(p2.substring(i,i+1))>0)
                {
                    return 0;
                }
            }

            for (var i=0; i<p3.length; i++)
            {
                if(char.indexOf(p3.substring(i,i+1))>0)
                {
                    return 0;
                }
            }

	    return 1;
	}

}

function check_paran(mail) //paran À» ÀÔ·ÂÇß´ÂÁö Ã¼Å©...
{
	var paranco=/paran.co.kr/i;
	var parancom = /paran.com/i;

	var hostname = mail.split("@");

	if((hostname[1].match(paranco)) || (hostname[1].match(parancom)))
		return 0;
	else
		return 1;
}


function check_sayclub(mail) //sayclubÀ» ÀÔ·ÂÇß´ÂÁö Ã¼Å©...
{
	var sayclubco=/sayclub.co.kr/i;
	var sayclubcom = /sayclub.com/i;

	var hostname = mail.split("@");

	if((hostname[1].match(sayclubco)) || (hostname[1].match(sayclubcom)))
		return 0;
	else
		return 1;
}

function  is_leap_check(y) //À±³â Ã¼Å©..
{
	if(y%4==0 && y%100 != 0 || y%400 == 0)
		return 1;
	else
		return 0;
}

function check_jumin(j1, j2) //ÁÖ¹Îµî·Ï¹øÈ£°¡ À¯È¿ÇÑÁö Ã¼Å©...
{
	var str = j1.concat(j2);
	re = /^[0-9]{6}[0-9]{7}$/;

	if(!re.test(str))  return 0;

	var tmp = 0;
	var year = parseInt(str.substr(0,2), 10);
	var month = parseInt(str.substr(2,2), 10);
	var day  = parseInt(str.substr(4,2), 10);
	var mancheck = parseInt(str.charAt(6), 10);

	if(((month < 1) || (month > 12)) || ((mancheck < 1) || (mancheck > 4)))
		return 0;

	if(month  == 2)
	{
		year += mancheck < 3 ? 1900 : 2000;
		if(is_leap_check(year))
		{
			if(day > 29)  return 0;
		}
		else
		{
			if(day > 28)  return 0;
		}
	}

	for(var n=0; n<12; n++)
	{
		tmp += (n%8+2) * parseInt(str.charAt(n));
	}

	tmp = (11 - (tmp % 11)) % 10;
	if(tmp != str.charAt(12)) return 0;
	return 1;
}

function  password_check(p1, p2, min, max)
{
	//var str="!@#$%^&*()~{}[]:;'`<>0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; //ºñ¹Ð¹øÈ£´Â ¿µ¼ýÀÚ·Î 4ÀÚÀÌ»ó 20ÀÚÀÌÇÏ·Î ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.


	if((p1.length < min) || (p1.length > max)) //(minÀÚÀÌÇÏ³ª maxÀÚ ÀÌ»óÀÌ¸é ¿¡·¯)
		return 1;

	if(p1.length != p2.length)  //µÑÀÇ ±æÀÌ°¡ ¼­·Î Æ²¸®¸é ¿¡·¯
		return 2;


	for(var i=0; i<p1.length; i++) //¼­·ÎÀÇ ³»¿ëÀÌ Æ²¸®¸é ¿¡·¯ È¤Àº ¿µ¼ýÀÚÀÌ µé¾î¿Íµµ ¿¡·¯.
	{
		if(p1.charAt(i) != p2.charAt(i))
			return 3;
		//else if((str.indexOf(p1.charAt(i) < 0)) || (str.indexOf(p2.charAt(i)) < 0))
		//	return 4;
	}

	return 5;
}


function FormCheck(form)
{
	var  userid = document.personalformcheck.userid.value;
	var  username = document.personalformcheck.username.value;
	var  password = document.personalformcheck.password.value;
	var  password1 = document.personalformcheck.password1.value;
	//var  jumin1    = document.personalformcheck.jumin1.value;
	var  jumin2    = document.personalformcheck.jumin2.value;
	var  address   = document.personalformcheck.address.value;
	var  zip1      = document.personalformcheck.zip1.value;
	var  zip2      = document.personalformcheck.zip2.value;
	var  phone1    = document.personalformcheck.phone1.value;
	var  phone2    = document.personalformcheck.phone2.value;
	var  phone3    = document.personalformcheck.phone3.value;
	var  hphone1   = document.personalformcheck.hphone1.value;
	var  hphone2   = document.personalformcheck.hphone2.value;
	var  hphone3   = document.personalformcheck.hphone3.value;
	var  email     = document.personalformcheck.email.value;
	var  ret;

	if(!userid)
	{
		print_error("À¥¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		return;
	}

	if(!username)
	{
		print_error("È¸¿ø´ÔÀÇ ÀÌ¸§À» Àû¾îÁÖ¼¼¿ä.");
		document.personalformcheck.username.focus();
		return;
	}

	if((!password) || (!password1))
	{
		print_error("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.personalformcheck.password.select();
		document.personalformcheck.password.focus();
		return;
	}

	if(ret=password_check(password, password1, '4', '20'))
	{
		if(ret == 1)
		{
			print_error("ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 20ÀÚÀÌÇÏ¿©¾ß ÇÕ´Ï´Ù.");
			document.personalformcheck.password.select();
			document.personalformcheck.password.focus();
			return;
		}
		else if(ret == 2)
		{
			print_error("ºñ¹Ð¹øÈ£ÀÇ ±æÀÌ°¡ ¼­·Î ´Ù¸¨´Ï´Ù.");
			document.personalformcheck.password.select();
			document.personalformcheck.password.focus();
			return;
		}

		else if(ret == 3)
		{
			print_error("ºñ¹Ð¹øÈ£°¡ ¼­·Î ´Ù¸¨´Ï´Ù.");
			document.personalformcheck.password.select();
			document.personalformcheck.password.focus();
			return;
		}
		else if(ret == 4)
		{
			print_error("ºñ¹Ð¹øÈ£´Â ¿µ¼ýÀÚ¸¸ Çã¿ëÇÕ´Ï´Ù.");
			document.personalformcheck.password.select();
			document.personalformcheck.password.focus();
			return;
		}
	}
/*
	if(!jumin1)
	{
		print_error("ÁÖ¹Îµî·Ï¹øÈ£ÀÇ ¾ÕÀÇ 6ÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.personalformcheck.jumin1.select();
		document.personalformcheck.jumin1.focus();
		return;
	}
*/
	if(!jumin2)
	{
		print_error("È®ÀÎ¹øÈ£  ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.personalformcheck.jumin2.select();
		document.personalformcheck.jumin2.focus();
		return;
	}
/*
	if(!check_jumin(jumin1, jumin2))
	{
		print_error("ÁÖ¹Îµî·Ï¹øÈ£°¡ Àß¸øµÈ ¹øÈ£ÀÔ´Ï´Ù.");
		document.personalformcheck.jumin1.select();
		document.personalformcheck.jumin1.focus();
		return;
	}
*/
	if(!zip1 || !zip2)
	{
		print_error("¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		return;
	}
	if(!address)
	{
		print_error("ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		return;
	}

	if(!phone1 || !phone2 || !phone3)
	{
		alert('¿¬¶ôÃ³¸¦ Àû¾î ÁÖ½Ê½Ã¿ä');
		document.personalformcheck.phone1.focus();
		return;
	}
	else
	{
		if(!check_phone_number(phone1, phone2, phone3))
		{
			alert('¿¬¶ôÃ³´Â ¼ýÀÚ·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.');
			document.personalformcheck.phone1.select();
			document.personalformcheck.phone1.focus();
			return;
		}
	}

        if(!hphone1 || !hphone2 || !hphone3)
        {
                alert('ÇÚµåÆù ¹øÈ£¸¦ Àû¾î ÁÖ½Ê½Ã¿ä');
                document.personalformcheck.hphone1.focus();
                return;
        }
        else
        {
                if(!check_phone_number(hphone1, hphone2, hphone3))
                {
                        alert('ÇÚµåÆù ¹øÈ£´Â ¼ýÀÚ·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.');
                        document.personalformcheck.hphone1.select();
                        document.personalformcheck.hphone1.focus();
                        return;
                }
        }



	if(!email)
	{
		print_error("ÀÌ¸ÞÀÏÀ» Àû¾îÁÖ¼¼¿ä");
		document.personalformcheck.email.select();
		document.personalformcheck.email.focus();
		return;
	}

	if(email)
	{
		if(!check_mail(email))
		{
			alert('ÀÌ¸ÞÀÏ Çü½ÄÀÌ Æ²¸³´Ï´Ù.');
			document.personalformcheck.email.focus();
			return;
		}

		if(!check_sayclub(email))
		{
			alert('¸ÞÀÏ¿¡ sayclub.co.krÀÌ³ª sayclub.comÀº ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ´Ù¸¥ ÀÌ¸ÞÀÏÀ» Àû¾î ÁÖ½Ê½Ã¿ä');
			document.personalformcheck.email.select();
			document.personalformcheck.email.focus();
			return;
		}

		if(!check_paran(email))
		{
			alert('¸ÞÀÏ¿¡ paran.co.kr ÀÌ³ª paran.comÀº ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ´Ù¸¥ ÀÌ¸ÞÀÏÀ» Àû¾î ÁÖ½Ê½Ã¿ä');
			document.personalformcheck.email.select();
			document.personalformcheck.email.focus();
			return;
		}
	}


	document.personalformcheck.submit();
}


function BusinessFormCheck()
{
	var userid     = document.businessformcheck.userid.value; //À¥¾Æµð.
	var password1 = document.businessformcheck.password1.value; //ºñ¹ø1
	var password2 = document.businessformcheck.password2.value; //ºñ¹øÈ®ÀÎ
	var username  = document.businessformcheck.username.value;  //´ã´çÀÚ¸í.
	var email     = document.businessformcheck.email.value;    //´ã´çÀÚ ÀÌ¸ÞÀÏ.
	var phone1    = document.businessformcheck.phone1.value;  //´ã´çÀÚ ¿¬¶ôÃ³1.
	var phone2    = document.businessformcheck.phone2.value;  //´ã´çÀÚ ¿¬¶ôÃ³2.
	var phone3    = document.businessformcheck.phone3.value;  //´ã´çÀÚ ¿¬¶ôÃ³3.
	var bizName   = document.businessformcheck.bizName.value; //»óÈ£¸í
	var bizUser   = document.businessformcheck.bizUser.value; //´ëÇ¥ÀÚ¸í
	var bizNo1    = document.businessformcheck.bizNo1.value; //»ç¾÷ÀÚ ¹øÈ£1
	var bizNo2    = document.businessformcheck.bizNo2.value; //»ç¾÷ÀÚ ¹øÈ£2
	var bizNo3    = document.businessformcheck.bizNo3.value; //»ç¾÷ÀÚ ¹øÈ£3
	var bizPhone1   = document.businessformcheck.bizPhone1.value; //´ëÇ¥ÀüÈ­ 1.
	var bizPhone2   = document.businessformcheck.bizPhone2.value; //´ëÇ¥ÀüÈ­2.
	var bizPhone3   = document.businessformcheck.bizPhone3.value; //´ëÇ¥ÀüÈ­3.
	var bizZip1     = document.businessformcheck.bizZip1.value;	 //È¸»ç ¿ìÆí¹øÈ£1
	var bizZip2     = document.businessformcheck.bizZip2.value;  //È¸»ç ¿ìÆí¹øÈ£2
	var bizAddress  = document.businessformcheck.bizAddress.value;  //È¸»ç ÁÖ¼Ò..
	var bizFax1      = document.businessformcheck.bizFax1.value;  //ÆÑ½º¹øÈ£ 1.
	var bizFax2      = document.businessformcheck.bizFax2.value;  //ÆÑ½º¹øÈ£2.
	var bizFax3      = document.businessformcheck.bizFax3.value;  //ÆÑ½º¹øÈ£3.
	var uptae     = document.businessformcheck.uptae.value; //¾÷ÅÂ
	var upjong    = document.businessformcheck.upjong.value; //¾÷Á¾
	var is_mailing = document.businessformcheck.is_mailing.value;  //¸ÞÀÏ¸µ »ç¿ë ¿©ºÎ.
	var is_agency = document.businessformcheck.is_agency.value ;  //¿¡ÀÌÀü½Ã »ç¿ë¿©ºÎ.


	//Ã¼Å© ÇÒ »çÇ×. ºóÄ­ Ã¼Å©(userid, ºñ¹ø, ´ã´çÀÚ¸í, ´ã´çÀÚÀÌ¸ÞÀÏ, ´ã´çÀÚ ¿¬¶ôÃ³, »óÈ£¸í, ´ëÇ¥ÀÚ¸í, ¿ìÆí¹øÈ£, ÁÖ¼Ò, ´ëÇ¥ÀüÈ­)
        //Çü½Ä Ã¼Å© (userid, ºñ¹ø - ±æÀÌ Á¦ÇÑ Ã¼Å©, ÀÌ¸ÞÀÏ(Çü½Ä Ã¼Å© ¹× daum, sayclub Ã¼Å©), ¿¬¶ôÃ³(¹®ÀÚ¸¦ ÀÔ·ÂÇß´ÂÁö Ã¼Å©),
        //´ëÇ¥ÀüÈ­  (¹®ÀÚ¸¦ ÀÔ·ÂÇß´ÂÁö Ã¼Å©), »ç¾÷ÀÚ ¹øÈ£ (°ªÀÌ ÀÖÀ» °æ¿ì ¹®ÀÚ¸¦ ÀÔ·ÂÇß´ÂÁö Ã¼Å©) )

	if(!userid)
	{
		print_error("»ç¿ëÇÏ½Ç À¥¾Æµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		return;
	}

	if((!password1) || (!password2))
	{
		print_error("»ç¿ëÇÏ½Ç ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.businessformcheck.password1.select();
		document.businessformcheck.password1.focus();
		return;
	}

	if(ret=password_check(password1, password2, '4', '20'))
	{
		if(ret == 1)
		{
			print_error("ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 20ÀÚÀÌÇÏ¿©¾ß ÇÕ´Ï´Ù.");
			document.businessformcheck.password1.select();
			document.businessformcheck.password1.focus();
			return;
		}
		else if(ret == 2)
		{
			print_error("ºñ¹Ð¹øÈ£ÀÇ ±æÀÌ°¡ ¼­·Î ´Ù¸¨´Ï´Ù.");
			document.businessformcheck.password1.select();
			document.businessformcheck.password1.focus();
			return;
		}

		else if(ret == 3)
		{
			print_error("ºñ¹Ð¹øÈ£°¡ ¼­·Î ´Ù¸¨´Ï´Ù.");
			document.businessformcheck.password1.select();
			document.businessformcheck.password1.focus();
			return;
		}
		else if(ret == 4)
		{
			print_error("ºñ¹Ð¹øÈ£´Â ¿µ¼ýÀÚ¸¸ Çã¿ëÇÕ´Ï´Ù.");
			document.businessformcheck.password1.select();
			document.businessformcheck.password1.focus();
			return;
		}
	}

	if(!username)
	{
		print_error("´ã´çÀÚ¸íÀ» Àû¾îÁÖ¼¼¿ä");
		document.businessformcheck.username.select();
		document.businessformcheck.username.focus();
		return;
	}


	if(!email)
	{
		print_error("ÀÌ¸ÞÀÏÀ» Àû¾îÁÖ¼¼¿ä");
		document.businessformcheck.email.select();
		document.businessformcheck.email.focus();
		return;
	}

	if(email)
	{
		if(!check_mail(email))
		{
			alert('ÀÌ¸ÞÀÏ Çü½ÄÀÌ Æ²¸³´Ï´Ù.');
			document.businessformcheck.email.select();
			document.businessformcheck.email.focus();
			return;
		}

		if(!check_hanmail(email))
		{
			alert('¸ÞÀÏ¿¡ hanmail.netÀÌ³ª daum.netÀº ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ´Ù¸¥ ÀÌ¸ÞÀÏÀ» Àû¾î ÁÖ½Ê½Ã¿ä');
			document.businessformcheck.email.select();
			document.businessformcheck.email.focus();
			return;
		}


		if(!check_sayclub(email))
		{
			alert('¸ÞÀÏ¿¡ sayclub.co.krÀÌ³ª sayclub.comÀº ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ´Ù¸¥ ÀÌ¸ÞÀÏÀ» Àû¾î ÁÖ½Ê½Ã¿ä');
			document.businessformcheck.email.select();
			document.businessformcheck.email.focus();
			return;
		}


		if(!check_paran(email))
		{
			alert('¸ÞÀÏ¿¡ paran.co.krÀÌ³ª paran.comÀº ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ´Ù¸¥ ÀÌ¸ÞÀÏÀ» Àû¾î ÁÖ½Ê½Ã¿ä');
			document.businessformcheck.email.select();
			document.businessformcheck.email.focus();
			return;
		}
	}

	if(!phone1 || !phone2 || !phone3)
	{
		alert('´ã´çÀÚºÐÀÇ ¿¬¶ôÃ³¸¦ Àû¾î ÁÖ½Ê½Ã¿ä');
		document.businessformcheck.phone1.focus();
		return;
	}
	else
	{
		if(!check_phone_number(phone1, phone2, phone3))
		{
			alert('¿¬¶ôÃ³´Â ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
			document.businessformcheck.phone1.select();
			document.businessformcheck.phone1.focus();
			return;
		}
	}

	if(!bizName)
	{
		print_error("È¸»ç »óÈ£¸íÀ» Àû¾î ÁÖ½Ê½Ã¿ä");
		document.businessformcheck.bizName.select();
		document.businessformcheck.bizName.focus();
		return;
	}


	if(!bizUser)
	{
		print_error("´ëÇ¥ÀÚ¸íÀ» Àû¾î ÁÖ½Ê½Ã¿ä");
		document.businessformcheck.bizUser.select();
		document.businessformcheck.bizUser.focus();
		return;
	}

	if(bizNo1 && bizNo2 && bizNo3)  //»ç¾÷ÀÚ ¹øÈ£°¡ ÀÔ·ÂÀÌ µÇ¾úÀ¸¸é ¼ýÀÚÀÎÁö Ã¼Å©
	{
		if(!check_phone_number(bizNo1, bizNo2, bizNo3))
		{
			alert('»ç¾÷ÀÚ µî·Ï ¹øÈ£´Â ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
			document.businessformcheck.bizNo1.select();
			document.businessformcheck.bizNo1.focus();
			return;
		}
	}

	if(!bizZip1 || !bizZip2)
	{
		print_error("¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		return;
	}

	if(!bizAddress)
	{
		print_error("È¸»ç ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		return;
	}

	if(bizFax1 && bizFax2 && bizFax3)  //ÆÑ½º ¹øÈ£°¡ ÀÖÀ¸¸é ¼ýÀÚÀÎÁö¸¸ Ã¼Å©ÇÔ.
	{
		if(!check_phone_number(bizFax1, bizFax2, bizFax3))
		{
			alert('FAX ¹øÈ£´Â ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
			document.businessformcheck.bizFax1.select();
			document.businessformcheck.bizFax1.focus();
			return;
		}
	}



	if(!bizPhone1 || !bizPhone2 || !bizPhone3)
	{
		alert('È¸»çÀÇ ´ëÇ¥ ÀüÈ­ ¹øÈ£¸¦ Àû¾î ÁÖ½Ê½Ã¿ä');
		document.businessformcheck.bizPhone1.focus();
		return;
	}
	else
	{
		if(!check_phone_number(bizPhone1, bizPhone2, bizPhone3))
		{
			alert('´ëÇ¥ ÀüÈ­ ¹øÈ£´Â ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
			document.businessformcheck.bizPhone1.select();
			document.businessformcheck.bizPhone1.focus();
			return;
		}
	}

	businessformcheck.submit();
}


function ZipWindow(ref,what, type)
{
    var window_left=(screen.width-640)/2;
    var window_top=(screen.height-480)/2;
    ref=ref+"?what="+what+"&type="+type;
    window.open(ref,"zipWin",'width=470,height=390,status=no,scrollbars=yes,top=' +window_top +',left='+window_left+'');
}

function  login()
{
	var userid = document.logincheck.userid.value;
	var passwd = document.logincheck.passwd.value;

	if(!userid)
	{
		print_error("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.logincheck.userid.focus();
		return;
	}

	if(!passwd)
	{
		print_error("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.logincheck.passwd.focus();
		return;
	}

	document.logincheck.submit();
}

function  check_enter(code, type)
{
	if((type == '1') && ((code == '13') || (code == '9')))
	{
		document.logincheck.passwd.focus();
	}

	else if((type == '2') && (code == '13'))
	{
		document.logincheck.submit();
	}

}


function userid_focus()
{
	document.login.userid.focus();
}

//È£½ºÆÃ ½ÅÃ»½Ã ¾à°ü¿¡ µ¿ÀÇÇÏ´ÂÁö Ã¼Å©..
function  chkagree()
{
	var chk = document.agreeform.agree.checked;

	if(chk != true)
	{
		alert("¾à°ü¿¡ µ¿ÀÇ ÇÏ¼Å¾ß »óÇ° ½ÅÃ»ÀÌ °¡´ÉÇÕ´Ï´Ù.");
		return ;
	}

	document.agreeform.submit();
}


