function OpenZipcode(){
window.open("./zipcode/zipcode.php3?form=member&zip1=zip1&zip2=zip2&address=address","ZipWin","width=550,height=350,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
}


function check_ID_Window(ref) {
	var ID = eval(document.member.ID);
				
	if(!ID.value) {
		 alert('¾ÆÀÌµð(ID)¸¦ ÀÔ·ÂÇÏ½Å ÈÄ¿¡ È®ÀÎÇÏ¼¼¿ä!');
		 ID.focus();
		 return;
	} else if ( ID.value.length<4 || ID.value.length>12 ){
		 alert('¾ÆÀÌµð´Â 4 ~ 12ÀÚÀÇ ¿µ¹®¼Ò¹®ÀÚ³ª ¼ýÀÚ ¶Ç´Â Á¶ÇÕµÈ ¹®ÀÚ¿­ÀÌ¾î¾ß ÇÕ´Ï´Ù!');
		 ID.focus();
		 return;
	}else {
		 ref = ref + "?id=" + ID.value;
		 var window_left = (screen.width-640)/2;
		 var window_top = (screen.height-480)/2;
		 window.open(ref,"checkIDWin",'width=250,height=160,status=no,top=' + window_top + ',left=' + window_left + '');
	}
}
//############################################
//## È¸¿ø°¡ÀÔ 1´Ü°è Ã¼Å©
//############################################
function member_form_check1() {
	var chec=document.member;
	if ( !chec.KNAME.value )			{ alert('ÀÌ¸§¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.JUMIN1.value )			{ alert('ÁÖ¹Î¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.JUMIN2.value )			{ alert('ÁÖ¹Î¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
}

//############################################
//## È¸¿ø°¡ÀÔÆû 3´Ü°è
//############################################
function member_form_check() {
	var chec=document.member;
	if ( !chec.ID.value )				{ alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.PW.value )				{ alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.PW1.value )				{ alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.TEL01.value )			{ alert('ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.TEL02.value )			{ alert('ÈÞ´ëÆù¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.zip1.value )				{ alert('¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.zip2.value )				{ alert('¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.address.value )			{ alert('ÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.KADDRESS1.value )		{ alert('ÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
}

//############################################
//## °Ô½ÃÆÇ ÄÚ¸àÆ® Ã¼Å©
//############################################
function board_comment_check() {
	var chec=document.member;
	if ( !chec.NIC.value )				{ alert('ÀÌ¸§¶Ç´Â ´ÐÀ» ÀÔ·ÂÇÏ¼¼¿ä.' ); return false;}
	if ( !chec.PW.value )				{ alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.COMMENT.value )			{ alert('³»¿ëÀ» Àû¾îÁÖ¼¼¿ä.' ); return false;}
}

function login_form_check() {
	var chec=document.member1;
	if ( !chec.ID.value )				{ alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.PW.value )				{ alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.' ); return false;}
}

function install3_check() {
	var chec=document.install3;
	if ( !chec.ID.value )				{ alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.' ); return false;}
	if ( !chec.JUMIN1.value )			{ alert('ÁÖ¹Î¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.' ); return false;}
	if ( !chec.JUMIN2.value )			{ alert('ÁÖ¹Î¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.' ); return false;}
}



function board_form_check() {
	var chec=document.board;
	if ( !chec.KNAME.value )			{ alert('ÀÌ¸§Àº ÇÊ¼ö»çÇ×ÀÔ´Ï´Ù.' ); return false;}
	if ( !chec.SUBJECT.value )			{ alert('Á¦¸ñÀº ÇÊ¼ö»çÇ×ÀÔ´Ï´Ù.' ); return false;}
	if ( !chec.PASSWD.value )			{ alert('ºñ¹Ð¹øÈ£´Â ÇÊ¼ö»çÇ×ÀÔ´Ï´Ù.' ); return false;}
	if ( !chec.CONTENT.value )			{ alert('³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.' ); return false;}
}

function board_del_check() {
	var chec=document.board;
	if ( !chec.PW.value )				{ alert('ºñ¹Ð¹øÈ£´Â ÀÔ·ÂÇÏ¼¼¿ä.' ); return false;}
}

function board_create_check() {
	var chec=document.board;
	if ( !chec.table.value )			{ alert('Å×ÀÌºí¸íÀ» ¿µ¹®À¸·Î ÀÔ·ÂÇÏ¼¼¿ä.' ); return false;}
	if ( !chec.board_name.value )		{ alert('º¸µå¸íÀ» Àû¾îÁÖ¼¼¿ä.' ); return false;}
}

function poll_create_check() {
	var chec=document.poll;
	if ( !chec.TITLE.value )			{ alert('Áú¹®ÇÒ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.' ); return false;}
	if ( !chec.SDATE.value )			{ alert('ÅõÇ¥ ½ÃÀÛÀÏ½Ã¸¦ ÀÔ·ÂÇÏ¼¼¿ä..' ); return false;}
	if ( !chec.EDATE.value )			{ alert('ÅõÇ¥ ³¡³ºÀÏ½Ã¸¦ ÀÔ·ÂÇÏ¼¼¿ä.' ); return false;}
}
// »èÁ¦ÇÔ¼ö
function Really(){
		if(confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n»èÁ¦ÇÏ½Ã¸é º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.')) return true;
		return false;
}


//############################################
//## Å×ÀÌºí Å×µÎ¸®
//############################################
function roundTable(objID) {
       var obj = document.getElementById(objID);
       var Parent, objTmp, Table, TBody, TR, TD;
       var bdcolor, bgcolor, Space;
       var trIDX, tdIDX, MAX;
       var styleWidth, styleHeight;

       // get parent node
       Parent = obj.parentNode;
       objTmp = document.createElement('SPAN');
       Parent.insertBefore(objTmp, obj);
       Parent.removeChild(obj);

       // get attribute
       bdcolor = obj.getAttribute('rborder');
       bgcolor = obj.getAttribute('rbgcolor');
       radius = parseInt(obj.getAttribute('radius'));
       if (radius == null || radius < 1) radius = 1;
       else if (radius > 6) radius = 6;

       MAX = radius * 2 + 1;
       
       /*
              create table {{
       */
       Table = document.createElement('TABLE');
       TBody = document.createElement('TBODY');

       Table.cellSpacing = 0;
       Table.cellPadding = 0;

       for (trIDX=0; trIDX < MAX; trIDX++) {
              TR = document.createElement('TR');
              Space = Math.abs(trIDX - parseInt(radius));
              for (tdIDX=0; tdIDX < MAX; tdIDX++) {
                     TD = document.createElement('TD');
                     
                     styleWidth = '1px'; styleHeight = '1px';
                     if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
                     else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
                     else if (radius > 2) {
                            if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
                            if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
                     }

                     if (styleWidth != null) TD.style.width = styleWidth;
                     if (styleHeight != null) TD.style.height = styleHeight;

                     if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
                     else if (tdIDX > Space && Space < MAX - tdIDX - 1)  TD.style.backgroundColor = bgcolor;
                     
                     if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
                     TR.appendChild(TD);
              }
              TBody.appendChild(TR);
       }

       /*
              }}
       */

       Table.appendChild(TBody);
       
       // insert table and remove original table
       Parent.insertBefore(Table, objTmp);
}
