/*
	ÀÔ»çÁö¿ø °øÅë ÇÔ¼ö
	³ªº¸±Õ / 2006-11-08
*/


// ¼ýÀÚ¸¸ ÀÔ·Â¹Þ±â
function onlyNumber()
{
	if ((event.keyCode < 48) || (event.keyCode > 57)) event.returnValue = false;
	return true;
}

// ÀÚµ¿ Æ÷Ä¿½º ÀÌµ¿
function moveFocus(my, next, s)
{
	obj = eval("document.jForm." + next);
	if(my.length == s) obj.focus();
}

// ÀÌ¸ÞÀÏÃ¼Å©
function chkEmail(sEmail)
{
	var pattern = /([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/;
	if (!pattern.test(sEmail)) 
	{
		alert("¸ÞÀÏÁÖ¼Ò Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù. ¸ÞÀÏÁÖ¼Ò¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä");
		return false;
	}

	return true;
}

// ÇÑ±Û¸¸ ÀÔ·Â °¡´É
function korChk(str)
{
	for(var i=0; i < str.length; i++)
	{ 
		var c = str.charCodeAt(i); 

		//( 0xAC00 <= c && c <= 0xD7A3 ) ÃÊÁßÁ¾¼ºÀÌ ¸ðÀÎ ÇÑ±ÛÀÚ 
		//( 0x3131 <= c && c <= 0x318E ) ÀÚÀ½ ¸ðÀ½ 
		//(  0x61 <= c && c <= 0x7A )    ¼Ò¹®ÀÚ
		//( 0x41 <= c && c <= 0x5A ))    ´ë¹®ÀÚ

		if(!(( 0xAC00 <= c && c <= 0xD7A3 )||( 0x3131 <= c && c <= 0x318E )) ) 
		{      
			alert("ÇÑ±Û¸¸ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù!");        
			return false;
		}
	}  

	return true;
}

//¿ìÆí¹øÈ£ °Ë»ö Ã¢¶ç¿ì±â
function popZipcode(a)
{
	window.open("pop_zipcode.php?a="+a,"zip","width=516,scrollbars=yes,height=250,top=100,left=200");
}

function popZipcode_jm(a)
{
	window.open("pop_zipcode_jm.php?a="+a,"zip","width=516,scrollbars=yes,height=250,top=100,left=200");
}

//»çÁøµî·ÏÃ¢ ¶ç¿ì±â
function popPicture()
{
	window.open("pop_picture.php","picture","width=500,height=200,scrollbars=no,top=100,left=200");
}

