	function NCP_pupop(user_id, user_pw)
	{
		document.write("<form name = 'ncpForm'>"); 	
		document.write("<input type ='hidden' name ='user_id' value =''>"); 	
		document.write("<input type ='hidden' name ='user_pw' value =''>"); 	
		document.write("</form>"); 		
		
		var form = eval("document.ncpForm");

		form.user_id.value = user_id;
		form.user_pw.value = user_pw;

		PopUp("", "ncp", 400, 284);
		form.target = "ncp";
		form.method = "post";
		form.action = "/member/pop_realname.asp";
		form.submit();
	}



	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}

	function MM_showHideLayers() { //v6.0
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v; }
	}

	function GoMenu(me) {
		var m = eval(me);
		if (m == null || m == "") {
			alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
			return;
		} else {
			location.href = m;
		}
	}


	function PopUp(url, wName, width, height) {//È­¸éÀÇ Áß¾Ó
		var LeftPosition = (screen.width/2) - (width/2);
		var TopPosition = (screen.height/2) - (height/2);
		var win = window.open(url, wName, "left="+LeftPosition+",top="+TopPosition+",width="+width+",height="+height);

		if(win == null){
			alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØÁÖ¼¼¿ä!");
		} else{
			win.focus();
		}
	}

	function PopUp_withScroll(url, wName, width, height) {//È­¸éÀÇ Áß¾Ó
		var LeftPosition = (screen.width/2) - (width/2);
		var TopPosition = (screen.height/2) - (height/2);
		var win = window.open(url, wName, "left="+LeftPosition+",scrollbars=yes,top="+TopPosition+",width="+width+",height="+height);

		if(win == null){
			alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØÁÖ¼¼¿ä!");
		} else{
			win.focus();
		}
	}


	function OpenWinFullScreen(strUrl, s){
		var win = window.open(strUrl , "FullScreen", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+s+",resizable=0")
		win.focus();
	}
		
	function ObjNullChk(obj, msg){
		if(obj.value==""){
			alert(msg+"À»(¸¦) ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			obj.focus();
			return true;
		}else{
			return false;
		}
	}

	function SetCookie(name, value, expiredays){//ÄíÅ° ¼³Á¤
		var todayDate = new Date(); 
		todayDate.setDate( todayDate.getDate() + expiredays ); 
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";";
	} 

	function GetCookie (name) {//ÄíÅ° ÃßÃâ
		var arg = name + "=";
		var alen = arg.length; 
		var clen = document.cookie.length;
		var i = 0;

		while (i < clen) {
			var j = i + alen; 
			if (document.cookie.substring(i, j) == arg){
				var endstr = document.cookie.indexOf (";", j);
				if (endstr == -1) 
					endstr = document.cookie.length; 
				return unescape(document.cookie.substring(j, endstr));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
		return null;
	} 

	function DeleteCookie (name) {//ÄíÅ° »èÁ¦
		var exp = new Date(); 
		exp.setTime (exp.getTime() - 1); 
		var cval = GetCookie (name); 
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); 
	} 

	function ChkRadioChecked(obj){//¶óµð¿À ¹öÆ°ÀÇ Ã¼Å©À¯¹« °Ë»ç
		var chk = false;
		for(i=0; i<=obj.length-1; i++){
			if(obj[i].checked)
				chk = true;
		}
		return chk;
	}

	function CopyClipBoard(strObj){//Å¬¸³º¸µå·Î ÅØ½ºÆ® º¹»ç
		var ra;
		var tempObj;
		tempObj = eval("document."+strObj);
		tempObj.focus();
		tempObj.select();
		ra = tempObj.createTextRange()
		ra.execCommand("copy");
		alert('ÀÌ¹ÌÁöÀÇ °æ·Î°¡ Å¬¸³º¸µå¿¡ º¹»çµÇ¾ú½À´Ï´Ù. \n\n'
		+'º¹»çÇÏ½Ç °÷¿¡¼­ Ctrl + v ¶Ç´Â ¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ°À» ´­·¯ ºÙ¿©³Ö±â ÇÏ½Ã¸é µË´Ï´Ù.\n\n');
	}

	function FileExtCheck(obj, n) {//ÆÄÀÏ¸íÀÇ È®ÀåÀÚ¿Í Æ¯¼ö¹®ÀÚ °Ë»ç, ¸¶Ä§Ç¥ 2°³ ÀÌ»ó »ç¿ëµÇ¾ú´ÂÁö °Ë»ç
		var t = obj.value;
		var strFn;
		var strFn2;
		var re;
		var dotCnt = 0;
		
		if((t.lastIndexOf(".jpg")==-1) && (t.lastIndexOf(".gif")==-1) && (t.lastIndexOf(".JPG")==-1) && (t.lastIndexOf(".GIF")==-1)) {
			alert(n+"¹ø ÆÄÀÏ : ¾÷·ÎµåÇÒ ÆÄÀÏÀº JPG ¶Ç´ÂGIF¸¸ °¡´ÉÇÕ´Ï´Ù. ");
			return false;
		}
		
		//ÆÄÀÏ¸í¿¡ Æ¯¼ö¹®ÀÚ °Ë»ç
		strFn = t.substring(t.lastIndexOf("\\")+1, t.length);//È®ÀåÀÚ Æ÷ÇÔ ÆÄÀÏ¸í
		strFn2 = strFn.substring(0, strFn.indexOf("."));//È®ÀåÀÚ Á¦¿ÜÇÑ ÆÄÀÏ¸í
		
		re = /!|@|#|\$|%|\^|&|\*|\+|\?|\.|\,/;
		
		if(re.test(strFn2)){
			alert(n+"¹ø ÆÄÀÏ : ÆÄÀÏ¸í¿¡ Æ¯¼ö¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");
			return false;
		}
		
		for(i=0; i<strFn.length; i++){
			if(strFn.substring(i,i+1)=="."){
				dotCnt++;
			}
		}
		if(dotCnt > 1){
			alert(n+'¹ø ÆÄÀÏ : ÆÄÀÏ¸í¿¡ ±¸ºÐÀÚ(ÆÄÀÏ¸í°ú È®ÀåÀÚ ±¸ºÐ) " . " ´Â 1°³ÀÌ»ó »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.');
			return false;
		}
		
		return true;
	}

	function FileExtCheck2(obj) {//ÆÄÀÏ¸íÀÇ È®ÀåÀÚ¿Í Æ¯¼ö¹®ÀÚ °Ë»ç, ¸¶Ä§Ç¥ 2°³ ÀÌ»ó »ç¿ëµÇ¾ú´ÂÁö °Ë»ç
		var t = obj.value;
		var strFn;
		var strFn2;
		var re;
		var dotCnt = 0;
		
		if((t.lastIndexOf(".jpg")==-1) && (t.lastIndexOf(".gif")==-1) && (t.lastIndexOf(".JPG")==-1) && (t.lastIndexOf(".GIF")==-1)) {
			alert("¾÷·ÎµåÇÒ ÆÄÀÏÀº JPG ¶Ç´ÂGIF¸¸ °¡´ÉÇÕ´Ï´Ù. ");
			return false;
		}
		
		//ÆÄÀÏ¸í¿¡ Æ¯¼ö¹®ÀÚ °Ë»ç
		strFn = t.substring(t.lastIndexOf("\\")+1, t.length);//È®ÀåÀÚ Æ÷ÇÔ ÆÄÀÏ¸í
		strFn2 = strFn.substring(0, strFn.indexOf("."));//È®ÀåÀÚ Á¦¿ÜÇÑ ÆÄÀÏ¸í
		
		re = /!|@|#|\$|%|\^|&|\*|\+|\?|\.|\,/;
		
		if(re.test(strFn2)){
			alert("ÆÄÀÏ¸í¿¡ Æ¯¼ö¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");
			return false;
		}
		
		for(i=0; i<strFn.length; i++){
			if(strFn.substring(i,i+1)=="."){
				dotCnt++;
			}
		}
		if(dotCnt > 1){
			alert('ÆÄÀÏ¸í¿¡ ±¸ºÐÀÚ(ÆÄÀÏ¸í°ú È®ÀåÀÚ ±¸ºÐ) " . " ´Â 1°³ÀÌ»ó »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.');
			return false;
		}
		
		return true;
	}

	function CenterLayer(strObj){//º»¹® ·¹ÀÌ¾î¸¦ ºê¶ó¿ìÁ® Áß¾Ó¿¡ ¹èÄ¡
		var obj = eval("document.all."+strObj);
		var _x = (document.body.clientWidth-908)/2;
		var _y = (document.body.clientHeight+500)/2;
		obj.style.posLeft=_x;
		//document.layers["divCalendar"].style.posTop=_y;
	}

	function cardchk(type,idx,cp,tb,url) {
		if (type=="A")
		{
			location.href="Cardchk.asp?idx=" + idx + "&cp=" + cp + "&tb=" + tb + "&url=" + url;
		}

		if (type=="B")
		{
			alert("¹ß±ÞÃ³¸® µÇ¾ú½À´Ï´Ù.");
			return;
		}
	}


	//ÆÄÀÏ ¾÷·Îµå
	function UpLoadOpenWin(form, elem, path){
		var url = "/pub/fileUpload.asp?frmName="+form+"&elem="+elem+"&path="+path;
		var top = screen.height/2 - 75;
		var left = screen.width/2 - 200;
		var win = window.open(url, "uploadWin", "width=340, height=200, top="+top+", left="+left);
		win.focus();
	}


	// Ã·ºÎÆÄÀÏ »èÁ¦
	function DeleteFile(frmName, elem, directory, filename){
		if(filename.length==0){
			alert("»èÁ¦ÇÒ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù!.");
			return false;
		} else{
			if(confirm(filename + "ÆÄÀÏÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")){
				var url = "/pub/fileDel.asp?frmName="+frmName+"&elem="+elem+"&directory="+directory+"&filename="+filename;
				window.open(url,'deleteWin','location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no, width=300,height=200,left=0, top=0, scrollbars=no');
			}
		}
	}


	// ´Þ·Âº¸±â
	function OpenCalendar(frmName, elem){
		var url = "/pub/calendar.asp?frmName="+frmName+"&elem="+elem;
		var top = screen.height/2 - 75;
		var left = screen.width/2 - 200;
		var win = window.open(url, "uploadWin", "width=300, height=200, top="+top+", left="+left);
		win.focus();
	}


	function UpLoadOpenWin2(path, elem){//ÆÄÀÏ ¾÷·Îµå
		var url = "/pub/fileUp.asp?path="+path+"&element="+elem;
		var top = screen.height/2 - 75;
		var left = screen.width/2 - 200;
		var win = window.open(url, "uploadWin", "width=340, height=200, top="+top+", left="+left);
		win.focus();
	}

	function DelFile(path, elem){
		var fn = eval("frmW."+elem).value;
		
		if(fn != ""){
			if(confirm(fn+" ÆÄÀÏÀ» »èÁ¦ ÇÏ°Ú½À´Ï±î?")){
				var url = "/pub/fileDel.asp?path="+path+"&fn="+fn+"&element="+elem;
				df.location.href=url;
			}
		}else{
			alert("»èÁ¦ÇÒ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.");
			return;
		}
	}

	// *************************************************************
	//		Ãß°¡ºÎºÐ
	// *************************************************************

	function isNull(elem, msg){
		if(elem.value.Trim() == ""){
			alert(msg + " ÀÔ·ÂÇØÁÖ¼¼¿ä.");
			elem.value = "";
			elem.focus();
			return true;
		} else{
			return false;
		}
	}


	// ÀÌ¹ÌÁö »çÀÌÁî¿¡ ¸Â°Ô ÀÚµ¿À¸·Î Å©±âÁ¶ÀýµÇ´Â »õÃ¢¶ç¿ì±â
	function showPicture(src) {
	  var imgObj = new Image();
	  imgObj.src = src;

	  var wopt = "scrollbars=no,status=no,resizable=no";
	  wopt += ",width=" + imgObj.width;
	  wopt += ",height=" + imgObj.height;
	  
	  var wbody = "<head><title>»çÁø º¸±â</title>";
	  wbody += "<script language='javascript'>";
	  wbody += "function finalResize(){";
	  wbody += "  var oBody=document.body;";
	  wbody += "  var oImg=document.images[0];";
	  wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
	  wbody += "  var ydiff=oImg.height-oBody.clientHeight;";
	  wbody += "  window.resizeBy(xdiff,ydiff);";
	  wbody += "}";
	  wbody += "</"+"script>";
	  wbody += "</head>";
	  wbody += "<body onLoad='finalResize()' style='margin:0'>";
	  wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
	  wbody += "</body>";
	  winResult = window.open("about:blank","",wopt);
	  winResult.document.open("text/html", "replace");
	  winResult.document.write(wbody);
	  winResult.document.close();
	  
	  return;
	}


	function check_email(argObject) {
		var strEmail = argObject.value
		// email³»¿¡ '@'³ª '.'ÀÌ ¾øÀ¸¸é
		if (strEmail.indexOf(".", 0) == -1)
		{
			alert('e-mailÀ» Á¤È®È÷ ÀÔ·ÂÇÏ½Ê½Ã¿À.')
			argObject.focus(); argObject.select(); return false
		}
		// email³»¿¡ AlphaNumeric, '@', '.', '-','_' ÀÌ¿ÜÀÇ ¹®ÀÚ°¡ ÀÖÀ¸¸é
		for (i = 0; i < strEmail.length; i++) 
		{
			var ch = strEmail.substr(i,1)
			if ((ch < "0" || ch > "9") && (ch < "A" || ch > "Z") && (ch < "a" || ch > "z") && (ch != "@") && (ch != "_") && (ch != ".") && (ch != "-")) 
			{
				alert('E-MailÀ» Á¤È®È÷ ÀÔ·ÂÇÏ½Ê½Ã¿À.')
				argObject.focus(); argObject.select(); return false
			}
		}
		return true
	}


	//°ø¹é/¿µ¾î/Æ¯¼ö¹®ÀÚ °Ë»ö¼Ò½º
	function BJname(objtext1) {
		var inText = objtext1.value;
		var ret;

		for (var i = 0; i < inText.length; i++) {
			ret = inText.charCodeAt(i);
			if (ret > 31 && ret < 127) {
				alert("ÀÌ¸§Àº ¶ç¾î¾²±â ¾øÀÌ ÇÑ±Û·Î¸¸ ÀÔ·ÂÇÏ¼¼¿ä");
				objtext1.value = "";
				objtext1.focus();
				return false;
			}
		}
		return true;
	}

	function CheckStr(strOriginal, strFind, strChange){
		var position, strOri_Length;
		position = strOriginal.indexOf(strFind);  

		while (position != -1){
			strOriginal = strOriginal.replace(strFind, strChange);
			position    = strOriginal.indexOf(strFind);
		}

		strOri_Length = strOriginal.length;
		return strOri_Length;
	}


	// ÇÃ·¡½Ã Á¡¼±¾øÀÌ ¶ç¿ì±â..
	function getFlashObject(flashSrc, objWidth, objHeight, etcParam) {
		var tag = "";
		var baseFlashDir="";
		flashSrc = baseFlashDir + flashSrc;

		if ( etcParam != "" || etcParam != null ) {
			if ( etcParam.substr(0, 1) == "?" )
				flashSrc += etcParam;
			else
				flashSrc += "?" + etcParam;
		}

		tag += "<object id=\"adqua\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
		tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ";
		tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
		tag += "<param name=\"movie\" value=\"" + flashSrc + "\">";
		tag += "<param name=\"menu\" value=\"false\">";
		tag += "<param name=\"quality\" value=\"high\">";
		tag += "<param name=\"wmode\" value=\"transparent\">";
		tag += "<embed name=\"adqua\" src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
		tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
		tag += "wmode=\"transparent\"></embed>";
		tag += "</object>";

		document.write(tag);
	}


	// ÇÃ·¡½Ã Á¡¼±¾øÀÌ ¶ç¿ì±â(ÇÃ·¡½ÃÀÇ id/nameÁöÁ¤)..
	function getFlashObject(flashSrc, objWidth, objHeight, etcParam, flaName) {
		var tag = "";
		var baseFlashDir="";
		flashSrc = baseFlashDir + flashSrc;

		if ( etcParam != "" || etcParam != null ) {
			if ( etcParam.substr(0, 1) == "?" )
				flashSrc += etcParam;
			else
				flashSrc += "?" + etcParam;
		}

		tag += "<object id=\"" + flaName + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
		tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ";
		tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
		tag += "<param name=\"movie\" value=\"" + flashSrc + "\">";
		tag += "<param name=\"menu\" value=\"true\">";
		tag += "<param name=\"quality\" value=\"high\">";
//		tag += "<param name=\"wmode\" value=\"transparent\">";
		tag += "<embed name=\"" + flaName + "\" src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
		tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
		tag += "></embed>";
		tag += "</object>";

		document.write(tag);
	}


function swf(src, w, h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="bgcolor" value="#ffffff">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="menu" value="true">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}


	/*	F11, F5, ¼Ò½ºº¸±â ¸·±â.	*/

	if(window.Event)	// ³Ý½ºÄÉÀÌÇÁ¿¡¼­´Â ´ë¹®ÀÚ Event
		document.captureEvents(Event.MOUSEUP);

	function nocontextmenu(){		// IE
		event.cancelBubble = true;
		event.returnValue = false;
		return false;
	}

	function norightclick(e){		// Others..
		if(window.Event){
			if(e.which == 2 || e.which == 3)
				return false;
		} else{
			if(event.button == 2 || event.button == 3){
				event.cancelBubble = true;
				event.returnValue = false;
				return false;
			}
		}
	}

	function processKey(){
		if(event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82) || (event.keyCode >= 112 && event.keyCode <= 123) || event.keyCode == 8){
			event.keyCode = 0;
			event.cancelBubble = true;
			event.returnValue = false;
		}
	}
	/*
	document.onkeydown = processKey;
	document.oncontextmenu = nocontextmenu;
	document.onmousedown = norightclick;
	document.onselectstart = new Function("return false");
	document.ondragstart = new Function("return false");
	*/


	// ºê¶ó¿ìÀú ½ºÅ¸ÀÏ°ú ¹«°üÇÏ°Ô °íÁ¤µÈ »çÀÌÁî·Î ¸®»çÀÌÂ¡ÇÏ±â..
	function resizeMe(width, height){
		var _barsWidth, _barsHeight;
		var _oldWidth, _oldHeight;

		_barsWidth	= document.body.offsetWidth - document.body.clientWidth;
		_barsHeight	= document.body.offsetHeight - document.body.clientHeight;

		window.resizeTo( (width + _barsWidth), (height + _barsHeight) );
	}



// Trim Function Implementation from JScavitto
String.prototype.LTrim=new Function("return this.replace(/^\\s+/,'')")
String.prototype.RTrim=new Function("return this.replace(/\\s+$/,'')")
String.prototype.Trim= new Function("return this.replace(/^\\s+|\\s+$/g,'')")	
