// ÆË¾÷ ´ë½Å ·¹ÀÌ¾î class 
function popupClass() {
	var divCreate1	= document.createElement("div"); 
	var divCreate2	= document.createElement("div"); 

	divCreate1.setAttribute("id","__showDivBg__"); 
	divCreate1.style.cssText="position:absolute;left:0px;top:0px;z-index:50;display:'none';";
	divCreate1.setAttribute("onclick","alert('1');"); 
	document.body.appendChild(divCreate1);

	divCreate2.setAttribute("id","__showDivMain__"); 
	divCreate2.style.cssText="position:absolute;left:0px;top:0px;border:1px solid #000000;z-index:100;display:'none';";
	document.body.appendChild(divCreate2);

	this.agent_name	= navigator.userAgent.toLowerCase();
	this.is_ie		= ((this.agent_name.indexOf("msie") != -1) && (this.agent_name.indexOf("opera") == -1));
	this.is_gecko	= navigator.product;

	this.divBg		= document.getElementById('__showDivBg__');
	this.divMain	= document.getElementById('__showDivMain__');


	this.divBg.style.left		= '0px';
	this.divBg.style.top		= '0px';
	this.divBg.style.width		= '100%';
	this.divBg.style.height		= '100%';
	this.divBg.style.background	= "#FFFFFF";
	this.divBg.style.opacity	= (50/100);
	this.divBg.style.MozOpacity	= (50/100);
	this.divBg.style.KhtmlOpacity = (50/100);
	this.divBg.style.filter		= 'alpha(opacity=50)';

	this.showPopup	= function(url,w,h,bgClose,topClose,left,top) {
		var cHeight	= document.body.scrollHeight;
		var cWidth	= document.body.scrollWidth;
		if (this.is_gecko) cHeight += 10;

		this.divBg.style.height = cHeight + 'px';
		this.divBg.style.display = '';
		
		// »ó´Ü ´Ý±â ¹öÆ° È°¼ºÈ­ or ¹è°æ ´©¸£¸é ´Ý±â
		if(bgClose) {
			this.divBg.onclick = function()	{
											popClassClose();
											};
		}
		
		if(left != "") {
			this.divMain.style.left			= (document.body.clientWidth/2) + (document.body.scrollLeft-150) - (w/2);
		}else {
			this.divMain.style.left			= left+"px";
		}
		if(left != "") {
			this.divMain.style.top			= (document.body.clientHeight/2) + (document.body.scrollTop-40) - (h/2);
		}else {
			this.divMain.style.top			= top+"px";
		}

		this.divMain.style.width		= w + "px";
		this.divMain.style.display = '';
		
		if(topClose) {
			this.divMain.innerHTML	= "<table  style='width:100%;height=20;background-color:#FFFFFF;'><tr><td onclick='popClassClose();' align='right' style='cursor:pointer;'><img src='./skin/x.gif' title='´Ý±â'></td></tr></table>";
		}

		this.divMain.innerHTML	= this.divMain.innerHTML + "<iframe src='"+url+"' name='__targetiframe__' id='__targetiframe__' style='width:"+w+";height:"+h+"' frameborder='0' marginwidth='0' marginheight='0' topmargin='0' scrolling='no'></iframe>";
	}
}

function popClassClose() {
	document.getElementById('__showDivBg__').style.display	= 'none';
	document.getElementById('__showDivMain__').style.display	= 'none';
	document.getElementById('__showDivMain__').innerHTML		= "";
}


// °í°´ºÒ¸¸¼¾ÅÍ
function pop_singo(depts,tblName) {
	void(window.open(depts+"/common/skin/pop_singo/index.php?tblName="+tblName,"singo","top=0,left=0,width=0,height=0"));
}


// ¹®ÀÇ»çÇ×
function pop_form1(depts,tblName) {
	void(window.open(depts+"/common/skin/pop_form_line/index.php?tblName="+tblName,"formm","top=0,left=0,width=0,height=0"));
}

// Å»Åð
function memberExit()  {
	if(confirm("Á¤¸» Å»Åð ÇÏ½Ã°Ú½À´Ï±î?")) {
		document.memberFrm.mode.value = "exit";
		document.memberFrm.submit();
	}
}

// ¼öÁ¤
function mem_modify(depts,backUrl)  {
	void(window.open(depts+"/common/member/mem_modify.php?backUrl="+backUrl,"modify","top=0,left=0,width=0,height=0"));
}

// ·Î±×¾Æ¿ô
function logout(depts,backUrl) {
	top.location.href = depts+"/common/member/mem_logout.php?backUrl="+backUrl;
}

// ·Î±×ÀÎ
function login(depts) {
	void(window.open(depts+"/common/member/login_form.php","login","top=0,left=0,width=0,height=0"));
}

// xp2, ie7¿¡¼­ Ã¢ ½ÎÀÌÁî Á¶Àý by Ã¼¸®ÇÊÅÍ´Ô www.4te.co.kr
// ±âº» ±¸Á¶´Â bodyÅ©±â °¡Áö°í div¸¸µé°í div Å©±â·Î Ã¢Å©±â¸¦ ´Ù½Ã ÁöÁ¤ÇÏ°í div¸¸µé¾î Áø°Í »èÁ¦ ^^; ¸ÚÁø²Ç¼ö -.- b
// ¼³¸¶ »ç¿ë Çß´Ù°í Àâ¾Æ °¡Áø ¾ÊÀ¸½Ã°ÚÁÒ..¤Ì¤Ì;
function winResize() { 
	var Dwidth = parseInt(document.body.scrollWidth); 
	var Dheight = parseInt(document.body.scrollHeight); 
	var divEl = document.createElement("div"); 
	divEl.style.position = "absolute"; 
	divEl.style.left = "0px"; 
	divEl.style.top = "0px"; 
	divEl.style.width = "100%"; 
	divEl.style.height = "100%"; 

	document.body.appendChild(divEl); 

	window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight); 
	document.body.removeChild(divEl); 
} 


// ÀÌ¹ÌÁö ÆÄÀÏ °Ë»ö
function upImageChk(targetObj) {
	var fileObj		= event.srcElement;
	var fileName	= fileObj.value;
	if((/(.jpg|.jpeg|.gif|.png)$/i).test(fileName)) {
		fileObj.parentElement.children[0].src	= fileName;
	}else {
		alert('ÆÄÀÏÀº gif, jpg, png ÆÄÀÏ¸¸ ¾÷·Îµå °¡´ÉÇÕ´Ï´Ù.');
	}
}

// ÀÌ¹ÌÁö ¸®»çÀÌÁî ÈÄ ½ÎÀÌÆ® ¹ÝÈ¯
function imgresize(file_src,max_w,max_h) { 
	var rate	= 0;
	var reSize	= new Array;
	var img		= new Image(); 
	img.src		= file_src;

	var width	= img.width; 
	var height	= img.height; 
	var rate_w	= width/max_w;		// ÀÌ¹ÌÁö width ºñÀ² 
	var rate_h	= height/max_h;		// ÀÌ¹ÌÁö height ºñÀ² 

	if(height > max_h || width > max_w) { 
		if((height > max_h && width > max_w && rate_w > rate_h) || (height < max_h && width > max_w)) {rate = rate_w;} 
		else if((height >= max_h && width >= max_w && rate_w < rate_h) || (height >= max_h && width < max_w))  {rate = rate_h;} 

	} else {rate = 1;} 

	if(rate == 0) {
		rate = 1;
	}

	reSize[1] = height/rate; 
	reSize[0] = width/rate; 
	return reSize; 
} 

// ÀÌ¹ÌÁö ÆË¾÷ º¸±â
String.prototype.popupView = function () { 
    var img_view = this; 
    var x = x + 20 ; 
    var y = y + 30 ; 
    htmlz = "<html><head><title>ÀÌ¹ÌÁöÅ©°Ôº¸±â</title><style>body{margin:0;cursor:hand;}</style></head><body scroll=auto onload=\"width1=document.getElementById('Timage').width;if(width1>1024)width1=1024;height1=document.getElementById(\'Timage\').height;if(height1>768)height1=768;top.window.resizeTo(width1+30,height1+54);\" onclick=\"top.window.close();\"><img src='"+img_view+"'  title='Å¬¸¯ÇÏ½Ã¸é ´ÝÈü´Ï´Ù.' name='Timage' id='Timage' galleryimg=\"no\"></body></html>" 
    imagez = window.open('', "image", "width="+ 100 +", height="+ 100 +", top=0,left=0,scrollbars=auto,resizable=1,toolbar=0,menubar=0,location=0,directories=0,status=1"); 
    imagez.document.open(); 
    imagez.document.write(htmlz) 
    imagez.document.close(); 
} 

// ÅøÆÁ ¸ð¾ç»õ
function displayToolTip(frmObj,type,etc,e) {
	var divObj		= document.getElementById("multiDiv");
	var formData	= "";
	var depts		= frmObj.depts.value;

	if(type == "delete") {
		formData	= "";
		formData	+= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#5767A6;width:150px;height:80px;border:2px solid #DEDEDE;\"><tr>";
		formData	+= "<tr><td align=\"center\" style=\"font-size:9pt;color:#FFFFFF;height:20px;font-weight:bold;border-bottom:1px solid #DEDEDE;\">ºñ¹Ð¹øÈ£</td></tr>";
		formData	+= "<form name=\"toolTipFrm\" enctype=\"multipart/form-data\" onkeydown=\"if(event.keyCode==13) return false;\" >";
		formData	+= "<td align=\"center\">";
		formData	+= "<input type=\"hidden\" name=\"backUrl\"		value=\""+frmObj.backUrl.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"tblName\"		value=\""+frmObj.tblName.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"start\"		value=\""+frmObj.start.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shTitle\"		value=\""+frmObj.shTitle.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shKey\"		value=\""+frmObj.shKey.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"sort\"		value=\""+frmObj.sort.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"asc\"			value=\""+frmObj.asc.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"seq\"			value=\""+frmObj.seq.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"fileCnt\"		value=\""+frmObj.fileCnt.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"mode\"		value=\"delete\">";
		formData	+= "<input type=\"hidden\" name=\"depts\"		value=\""+depts+"\">";
		formData	+= "<input type=\"password\" name=\"divPwd\"		value=\"\" style=\"width:100px;\"><br>";
		formData	+= "<input type=\"button\" value=\"»èÁ¦\" onclick=\"toolTipAction('"+depts+"','"+type+"')\" style=\"cursor:pointer\">";
		formData	+= "<input type=\"button\" value=\"Ãë¼Ò\" onclick=\"toolTipAction('"+depts+"','none')\" style=\"cursor:pointer\">";
		formData	+= "</td>";
		formData	+= "</form></tr></table>";
		
		divObj.style.left		= event.clientX - 90;
		divObj.style.top		= event.clientY + document.body.scrollTop - 70;
	}

	if(type == "commentDel") {
		formData	= "";
		formData	+= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#5767A6;width:150px;height:80px;border:2px solid #DEDEDE;\"><tr>";
		formData	+= "<tr><td align=\"center\" style=\"font-size:9pt;color:#FFFFFF;height:20px;font-weight:bold;border-bottom:1px solid #DEDEDE;\">ºñ¹Ð¹øÈ£</td></tr>";
		formData	+= "<form name=\"toolTipFrm\" enctype=\"multipart/form-data\" onkeydown=\"if(event.keyCode==13) return false;\" >";
		formData	+= "<td align=\"center\">";
		formData	+= "<input type=\"hidden\" name=\"backUrl\"		value=\""+frmObj.backUrl.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"tblName\"		value=\""+frmObj.tblName.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"start\"		value=\""+frmObj.start.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shTitle\"		value=\""+frmObj.shTitle.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shKey\"		value=\""+frmObj.shKey.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"sort\"		value=\""+frmObj.sort.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"asc\"			value=\""+frmObj.asc.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"seq\"			value=\""+frmObj.seq.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"mode\"		value=\"commentDel\">";
		formData	+= "<input type=\"hidden\" name=\"commentSeq\"	value=\""+etc+"\">";
		formData	+= "<input type=\"hidden\" name=\"depts\"		value=\""+depts+"\">";
		formData	+= "<input type=\"password\"   name=\"divPwd\"		value=\"\" style=\"width:100px;\"><br>";
		formData	+= "<input type=\"button\" value=\"»èÁ¦\" onclick=\"toolTipAction('"+depts+"','"+type+"')\" style=\"cursor:pointer\">";
		formData	+= "<input type=\"button\" value=\"Ãë¼Ò\" onclick=\"toolTipAction('"+depts+"','none')\" style=\"cursor:pointer\">";
		formData	+= "</td>";
		formData	+= "</form></tr></table>";		
		divObj.style.left		= event.clientX - 90;
		divObj.style.top		= event.clientY + document.body.scrollTop - 70;
	}

	if(type == "hiddenUse") {
		formData	= "";
		formData	+= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#5767A6;width:150px;height:80px;border:2px solid #DEDEDE;\"><tr>";
		formData	+= "<tr><td align=\"center\" style=\"font-size:9pt;color:#FFFFFF;height:20px;font-weight:bold;border-bottom:1px solid #DEDEDE;\">ºñ¹Ð±Û ºñ¹Ð¹øÈ£</td></tr>";
		formData	+= "<form name=\"toolTipFrm\" enctype=\"multipart/form-data\" onkeydown=\"if(event.keyCode==13) return false;\" >";
		formData	+= "<td align=\"center\">";
		formData	+= "<input type=\"hidden\" name=\"backUrl\"		value=\""+frmObj.backUrl.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"tblName\"		value=\""+frmObj.tblName.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"start\"		value=\""+frmObj.start.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shTitle\"		value=\""+frmObj.shTitle.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shKey\"		value=\""+frmObj.shKey.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"sort\"		value=\""+frmObj.sort.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"asc\"			value=\""+frmObj.asc.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"seq\"			value=\""+etc+"\">";
		formData	+= "<input type=\"hidden\" name=\"mode\"		value=\"hiddenUse\">";
		formData	+= "<input type=\"hidden\" name=\"depts\"		value=\""+depts+"\">";
		formData	+= "<input type=\"password\"   name=\"divPwd\"		value=\"\" style=\"width:100px;\"><br>";
		formData	+= "<input type=\"button\" value=\"È®ÀÎ\" onclick=\"toolTipAction('"+depts+"','"+type+"')\" style=\"cursor:pointer\">";
		formData	+= "<input type=\"button\" value=\"Ãë¼Ò\" onclick=\"toolTipAction('"+depts+"','none')\" style=\"cursor:pointer\">";
		formData	+= "</td>";
		formData	+= "</form></tr></table>";		
		divObj.style.left		= event.clientX - 90;
		divObj.style.top		= event.clientY + document.body.scrollTop - 70;
	}

	if(type == "hiddenModify") {
		formData	= "";
		formData	+= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#5767A6;width:150px;height:80px;border:2px solid #DEDEDE;\"><tr>";
		formData	+= "<tr><td align=\"center\" style=\"font-size:9pt;color:#FFFFFF;height:20px;font-weight:bold;border-bottom:1px solid #DEDEDE;\">ºñ¹Ð±Û ºñ¹Ð¹øÈ£</td></tr>";
		formData	+= "<form name=\"toolTipFrm\" enctype=\"multipart/form-data\" onkeydown=\"if(event.keyCode==13) return false;\" >";
		formData	+= "<td align=\"center\">";
		formData	+= "<input type=\"hidden\" name=\"backUrl\"		value=\""+frmObj.backUrl.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"tblName\"		value=\""+frmObj.tblName.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"start\"		value=\""+frmObj.start.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shTitle\"		value=\""+frmObj.shTitle.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shKey\"		value=\""+frmObj.shKey.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"sort\"		value=\""+frmObj.sort.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"asc\"			value=\""+frmObj.asc.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"seq\"			value=\""+frmObj.seq.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"mode\"		value=\"hiddenModify\">";
		formData	+= "<input type=\"hidden\" name=\"depts\"		value=\""+depts+"\">";
		formData	+= "<input type=\"password\"   name=\"divPwd\"		value=\"\" style=\"width:100px;\"><br>";
		formData	+= "<input type=\"button\" value=\"È®ÀÎ\" onclick=\"toolTipAction('"+depts+"','"+type+"')\" style=\"cursor:pointer\">";
		formData	+= "<input type=\"button\" value=\"Ãë¼Ò\" onclick=\"toolTipAction('"+depts+"','none')\" style=\"cursor:pointer\">";
		formData	+= "</td>";
		formData	+= "</form></tr></table>";		
		divObj.style.left		= event.clientX - 90;
		divObj.style.top		= event.clientY + document.body.scrollTop - 70;
	}

	if(type == "deleteAdmin") {
		formData	= "";
		formData	+= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#5767A6;width:150px;height:80px;border:2px solid #DEDEDE;\"><tr>";
		formData	+= "<tr><td align=\"center\" style=\"font-size:9pt;color:#FFFFFF;height:20px;font-weight:bold;border-bottom:1px solid #DEDEDE;\">°ü¸®ÀÚ ±ÇÇÑ</td></tr>";
		formData	+= "<form name=\"toolTipFrm\" enctype=\"multipart/form-data\" onkeydown=\"if(event.keyCode==13) return false;\" >";
		formData	+= "<td align=\"center\">";
		formData	+= "<input type=\"hidden\" name=\"backUrl\"		value=\""+frmObj.backUrl.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"tblName\"		value=\""+frmObj.tblName.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"start\"		value=\""+frmObj.start.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shTitle\"		value=\""+frmObj.shTitle.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shKey\"		value=\""+frmObj.shKey.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"sort\"		value=\""+frmObj.sort.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"asc\"			value=\""+frmObj.asc.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"seq\"			value=\""+frmObj.seq.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"fileCnt\"		value=\""+frmObj.fileCnt.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"mode\"		value=\"delete\">";
		formData	+= "<input type=\"hidden\" name=\"depts\"		value=\""+depts+"\">";
		formData	+= "<input type=\"text\" name=\"divPwd\"		value=\"»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?\" style=\"width:120px;\" readonly><br>";
		formData	+= "<input type=\"button\" value=\"»èÁ¦\" onclick=\"toolTipAction('"+depts+"','"+type+"')\" style=\"cursor:pointer\">";
		formData	+= "<input type=\"button\" value=\"Ãë¼Ò\" onclick=\"toolTipAction('"+depts+"','none')\" style=\"cursor:pointer\">";
		formData	+= "</td>";
		formData	+= "</form></tr></table>";
		
		divObj.style.left		= event.clientX - 90;
		divObj.style.top		= event.clientY + document.body.scrollTop - 70;
	}


	if(type == "commentDelAdmin") {
		formData	= "";
		formData	+= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#5767A6;width:150px;height:80px;border:2px solid #DEDEDE;\"><tr>";
		formData	+= "<tr><td align=\"center\" style=\"font-size:9pt;color:#FFFFFF;height:20px;font-weight:bold;border-bottom:1px solid #DEDEDE;\">°ü¸®ÀÚ ±ÇÇÑ</td></tr>";
		formData	+= "<form name=\"toolTipFrm\" enctype=\"multipart/form-data\" onkeydown=\"if(event.keyCode==13) return false;\" >";
		formData	+= "<td align=\"center\">";
		formData	+= "<input type=\"hidden\" name=\"backUrl\"		value=\""+frmObj.backUrl.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"tblName\"		value=\""+frmObj.tblName.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"start\"		value=\""+frmObj.start.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shTitle\"		value=\""+frmObj.shTitle.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"shKey\"		value=\""+frmObj.shKey.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"sort\"		value=\""+frmObj.sort.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"asc\"			value=\""+frmObj.asc.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"seq\"			value=\""+frmObj.seq.value+"\">";
		formData	+= "<input type=\"hidden\" name=\"mode\"		value=\"commentDel\">";
		formData	+= "<input type=\"hidden\" name=\"commentSeq\"	value=\""+etc+"\">";
		formData	+= "<input type=\"hidden\" name=\"depts\"		value=\""+depts+"\">";
		formData	+= "<input type=\"text\" name=\"divPwd\"		value=\"»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?\" style=\"width:120px;\" readonly><br>";
		formData	+= "<input type=\"button\" value=\"»èÁ¦\" onclick=\"toolTipAction('"+depts+"','"+type+"')\" style=\"cursor:pointer\">";
		formData	+= "<input type=\"button\" value=\"Ãë¼Ò\" onclick=\"toolTipAction('"+depts+"','none')\" style=\"cursor:pointer\">";
		formData	+= "</td>";
		formData	+= "</form></tr></table>";		
		divObj.style.left		= event.clientX - 90;
		divObj.style.top		= event.clientY + document.body.scrollTop - 70;
	}

	divObj.innerHTML		= formData;
	divObj.style.display	= "block";
	document.toolTipFrm.divPwd.focus();
	return;
}

// ÅøÆÁ¿¡¼­ ³ª¿Â ¾×¼Ç
function toolTipAction(depts,type) {
	var toolTipFrm	= document.toolTipFrm;
	var divObj		= document.getElementById("multiDiv");

	if(type == "delete") {
		toolTipFrm.action			= depts+"/common/process.php";
		toolTipFrm.method			= "post";
		if(toolTipFrm.divPwd.value == "") {
			alert("µî·Ï½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			toolTipFrm.divPwd.focus();
			return;
		}else {
			toolTipFrm.submit();
		}
	}

	if(type == "commentDel") {
		toolTipFrm.action			= depts+"/common/process.php";
		toolTipFrm.method			= "post";
		if(toolTipFrm.divPwd.value == "") {
			alert("µ¡±Û µî·Ï½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			toolTipFrm.divPwd.focus();
			return;
		}else {
			toolTipFrm.submit();
		}
	}

	if(type == "hiddenUse") {
		toolTipFrm.action			= depts+"/common/process.php";
		toolTipFrm.method			= "post";
		if(toolTipFrm.divPwd.value == "") {
			alert("ÀÛ¼º½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			toolTipFrm.divPwd.focus();
			return;
		}else {
			toolTipFrm.submit();
		}
	}

	if(type == "hiddenModify") {
		toolTipFrm.action			= depts+"/common/process.php";
		toolTipFrm.method			= "post";
		if(toolTipFrm.divPwd.value == "") {
			alert("ÀÛ¼º½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			toolTipFrm.divPwd.focus();
			return;
		}else {
			toolTipFrm.submit();
		}
	}

	if(type == "deleteAdmin") {
		toolTipFrm.action			= depts+"/common/process.php";
		toolTipFrm.method			= "post";
		if(toolTipFrm.divPwd.value == "") {
			alert("µî·Ï½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			toolTipFrm.divPwd.focus();
			return;
		}else {
			toolTipFrm.submit();
		}
	}

	if(type == "commentDelAdmin") {
		toolTipFrm.action			= depts+"/common/process.php";
		toolTipFrm.method			= "post";
		if(toolTipFrm.divPwd.value == "") {
			alert("µ¡±Û µî·Ï½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			toolTipFrm.divPwd.focus();
			return;
		}else {
			toolTipFrm.submit();
		}
	}

	if(type == "none") {
		divObj.style.display	= "none";
		divObj.style.width		= "0px";
		divObj.style.height		= "0px";
		return;
	}
}

////// naver.com ÂüÁ¶ /////
// ÀÌ¸§ Ã¼Å© 
function validNAME(str) {
	
	if( str == '' ){
		alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä");
		return 0;
	}
	
	var retVal = checkSpace( str );
	if( retVal != ""){
		alert("ÀÌ¸§Àº ¶ç¾î¾²±â ¾øÀÌ ÀÔ·ÂÇÏ¼¼¿ä.");
		return 0;
	}
	if( !isHangul(str) ) {
		alert("ÀÌ¸§À» ÇÑ±Û·Î ÀÔ·ÂÇÏ¼¼¿ä.");
		return 0;
	}
	if( str.length > 10 ) {
		alert("ÀÌ¸§Àº 7ÀÚ±îÁö¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
		return 0;
	}
	return 1;
}

// °ø°£ Á¦°Å
function checkSpace( str ) {
	if(str.search(/\s/) != -1){
		return 1;
	}

	else {
		return "";
	}
}

// ÇÑ±Û Ã¼Å©
function isHangul(s) {
	var len;
	
	len = s.length;

	for (var i = 0;i < len;i++) {
		if (s.charCodeAt(i) != 32 && (s.charCodeAt(i) < 44032 || s.charCodeAt(i) > 55203))
		return 0;
	}
	return 1;
}

// ÁÖ¹Î Ã¼Å©
function checkDigit_socno(socno) {
	var socnoStr = socno.toString();
	a = socnoStr.substring(0, 1);
	b = socnoStr.substring(1, 2);
	c = socnoStr.substring(2, 3);
	d = socnoStr.substring(3, 4);
	e = socnoStr.substring(4, 5);
	f = socnoStr.substring(5, 6);
	g = socnoStr.substring(6, 7);
	h = socnoStr.substring(7, 8);
	i = socnoStr.substring(8, 9);
	j = socnoStr.substring(9, 10);
	k = socnoStr.substring(10, 11);
	l = socnoStr.substring(11, 12);
	m = socnoStr.substring(12, 13);
	month = socnoStr.substring(2,4);
	day = socnoStr.substring(4,6);
	socnoStr1 = socnoStr.substring(0, 7);
	socnoStr2 = socnoStr.substring(7, 13);

	/* 2004.03.20 ¿ùÀÏ valid check */
	if(month <= 0 || month > 12) return 'N';
	if(day <= 0 || day > 31) return 'N';

	/* 2004.03.20 ÁÖ¹Îµî·ÏµÞÀÚ¸® Ã¹¹øÂ° ¹øÈ£ À¯È¿¼º Ã¼Å© (1,2,3,4) are only valid -- by muse */
	if(g > 4 || g == 0) return 'N';

	/* 2004.05.07 ÁÖ¹Îµî·Ï¹øÈ£¿¡ °ø¹éÀÌ µé¾î°¡µµ °¡ÀÔÀÌ µÇ´Â °æ¿ì°¡ ¹ß»ýÇÏÁö ¾Êµµ·Ï -- by fywowng*/
	if (isNaN(socnoStr1) || isNaN(socnoStr2))
	{
		return 'N';
	}

	temp=a*2+b*3+c*4+d*5+e*6+f*7+g*8+h*9+i*2+j*3+k*4+l*5;
	temp=temp%11;
	temp=11-temp;
	temp=temp%10;
	
	if(temp == m)
		return 'Y';
	else
		return 'N';
}
/////////////////////// naver Ã¼Å© ÂüÁ¶ ³¡

// Ãµ´ÜÀ§ , Âï±â 
function cPayjs(sumValue) {
	str = ""+sumValue+"";
	var retValue = "";
	for(i=0; i<str.length; i++)  {
		if(i > 0 && (i%3)==0) {
			retValue = str.charAt(str.length - i -1) + "," + retValue;
		} else {
			retValue = str.charAt(str.length - i -1) + retValue;
		}
	}
	return retValue;
}

// , ¾ø¾Ö±â
function rPayjs(keyword) { 
	var st_num; 
	st_num = keyword.indexOf(",");     
	while (st_num != -1) { 
		keyword = keyword.replace(",", ""); 
		st_num  = keyword.indexOf(","); 
	}
	return keyword; 
} 

//¼ýÀÚ ÆÇ´Ü 
function isnum(obj,str,dfnum) // str1 = obj, str2 = ¼³¸íºÎ(ÇÒ¸»)
{
	var ch;
	var i;
	var tobj;
	tobj = obj.value;
	ch = tobj.charAt(0);

	for (i=0; i<tobj.length; i++) {
		ch = tobj.charAt(i);
//	if (ch>='°¡' && ch <='ÆR') { } // ÇÑ±Û
//	if(ch>='a' && ch<='z') { } // ¿µ¼Ò¹®ÀÚ
//	if(ch>='A' && ch<='Z') { } // ¿µ´ë¹®ÀÚ 
		if(ch>='0' && ch<='9') { } // ¼ýÀÚ
//		else if(ch==" ") { } // °ø¹é¹®ÀÚ
//		else if(ch=='[' || ch==']') { } // [,] ±âÈ£
//		else if(ch=='_') { } // _ ±âÈ£
		else { // ºÎÀûÀýÇÑ ¹®ÀÚ
			alert(str);
			if(dfnum != "") {
				obj.value = dfnum;
			}
			obj.focus();
			return;
			}
	}
  return true;
}

// °ø¹é ¾ø¾Ö±â
function trim_s(keyword) { 
	var st_num, key_len; 
	st_num = keyword.indexOf(" ");
	while (st_num != -1) {
		keyword = keyword.replace(" ", "");
		st_num  = keyword.indexOf(" ");
	}
	key_len=keyword.length; 
	return key_len; 
} 



// ½º¹Ç½ºÇÏ°Ô ÀÌ¹ÌÁö Ã¾Áã
function trans(id,after) { 
	eval(id+'.filters.blendTrans.stop();'); 
	eval(id+'.filters.blendTrans.Apply();'); 
	eval(id+'.src="'+after+'";'); 
	eval(id+'.filters.blendTrans.Play();'); 
}

// ¿£ÅÍ ¿©ºÎ È®ÀÎ
function enterCheck(evt) { 
	var evCode = ( window.netscape ) ? evt.which : event.keyCode ; 
	if(evCode==13) { 
		return true; 
	}
	return false; 
}