function check_num(str,obj) {
	if(isNaN(str)) {
		alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.");
		obj.value=""
		obj.focus();
		
		return false;
	}
	return true;
}

function check_NE(str) {
	var val,i,chk
	for(i=0;i<str.length;i++) {
		val = str.charAt(i);
		if((val < '0' || val > '9')&&(val < 'a' || val > 'z')&&(val < 'A' || val > 'Z')) {
			chk = "fail"
			break;
		}
	}
	if (chk=="fail") {
		return false;
	}
	else {
		return true;
	}
}

function check_Mail(str) {
	if (str == "") {
		alert("¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}
	else {
		if(str.search(/(\S+)@(\S+)\.(\S+)/) == -1) {
			alert("¸ÞÀÏ ÁÖ¼Ò¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
			return false;
		}
		else {
			return true;
		}
	}
}

function exitgo() {
	var yes_no;
	yes_no = confirm("Á¤¸»·Î Å»ÅðÇÏ½Ã°Ú½À´Ï±î?")
	if(yes_no == 1) {
		location.href="exitok.asp"
	}
	else {
		return false;
	}
}

function find_zip(mode) {
	var x,y,str,str2
	x = screen.width;
	y = screen.height;

	x= (x-800)/3;
	y = (y-400)/3;
	str = "../member/find_zip.asp?mode="+mode
	str2 = "width=400,height=275,scrollbars=no,"+"top="+y+",left="+x;
	window.open(str,"zipcode",str2);
}

function chk_login() {
	var frm;
	frm = document.frmlogin;
	if (frm.iid.value.length == 0 || frm.iid.value < 4) {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ¾ÆÀÌµð´Â ÃÖ¼Ò 4ÀÚ ÀÌ»óÀÔ´Ï´Ù.");
		frm.iid.focus();
		return false;
	}
	if (frm.ipass.value.length == 0 || frm.ipass.value.length < 4) {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ºñ¹Ð¹øÈ£´Â ÃÖ¼Ò 4ÀÚ ÀÌ»óÀÔ´Ï´Ù.");
		frm.ipass.focus();
		return false;
	}
	frm.submit();
}

function zoom(src) {
	window.open('../common/zoom.asp?src='+src+'&mode=fscreen','zoom','scrollbars=yes,status=yes');
}

function layout(position) {
	if (position == "top") {
		document.write('<table width="990" height="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF" align="center">');
		document.write('<tr height="100"><td valign="top" align="center">');
	}
	else if (position == "middle1") {
		document.write('<tr height="100%"><td valign="top" align="center">');
	}
	else if (position == "middle2") {
		document.write('</td></tr>');
		document.write('<tr height="100"><td valign="top" align="center">');
	}
	else if (position == "bottom") {
		document.write('</td></tr>');
		document.write('</table>');
	}
	else {
	}
}

function mk_margin(height) {
	document.write('<div style="height:'+height+'px;"></div>');
}

function embed(media,name,file,width,height) {
	if (media == "mflash") {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="'+name+'">');
		document.write('<param name="movie" value="'+file+'" />');
		document.write('<param name="quality" value=best />');
		document.write('<embed src="'+file+'" quality="best" wmode="transparent" width="'+width+'" height="'+height+'" name="'+name+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
	else if (media == "mplayer") {
		document.write('<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width="'+width+'" height="'+height+'" id="movie">');
		document.write('<param name="ShowControls" value="false">');
		document.write('<param name="ShowStatusBar" value="false">');
		document.write('<param name="AutoRewind" value="true">');
		document.write('<param name="loop" value="0">');
		document.write('<param name="url" value="'+file+'" />');
		document.write('<embed name="movie" type="application/x-mplayer2" loop="0" src="'+file+'" pluginspage = http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width="'+width+'" height="'+height+'"/>');
		document.write('</object>');
	}
	else if (media == "mplayer1") {
		document.write('<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width="'+width+'" height="'+height+'" id="movie">');
		document.write('<param name="ShowControls" value="false">');
		document.write('<param name="ShowStatusBar" value="false">');
		document.write('<param name="AutoRewind" value="true">');
		document.write('<param name="loop" value="true">');
    	document.write('<param name="playCount" value="10">');
		document.write('<param name="url" value="'+file+'" />');
		document.write('<param name="uiMode" value="none" />');
		document.write('<embed name="movie" type="application/x-mplayer2" loop="0" src="'+file+'" pluginspage = http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width="'+width+'" height="'+height+'"/>');
		document.write('</object>');
	}
	else {
		alert("¿À·ù : ÆÄ¶ó¹ÌÅÍ°¡ Àß¸øµÇ¾ú½À´Ï´Ù. µ¿¿µ»ó/ÇÃ·¡½¬¸¦ »ðÀÔÇÒ ¼ö ¾ø½À´Ï´Ù");
	}
}

function resize(obj,size){
	if (obj.offsetWidth > size) {
		obj.width = size;
	}
}