var select_obj;
function sw_layer(name,status) { 
	var obj = document.all[name];
	var _tmpx,_tmpy, marginx, marginy;
	_tmpx = event.clientX + parseInt(obj.offsetWidth);
	_tmpy = event.clientY + parseInt(obj.offsetHeight);
	_marginx = document.body.clientWidth - _tmpx;
	_marginy = document.body.clientHeight - _tmpy ;
	if(_marginx < 0)
		_tmpx = event.clientX + document.body.scrollLeft + _marginx ;
	else
		_tmpx = event.clientX + document.body.scrollLeft ;
	if(_marginy < 0)
		_tmpy = event.clientY + document.body.scrollTop + _marginy +20;
	else
		_tmpy = event.clientY + document.body.scrollTop ;
	obj.style.posLeft=_tmpx-13;
	obj.style.posTop=_tmpy-12;
	if(status=='visible') {
		if(select_obj) {
			select_obj.style.visibility='hidden';
			select_obj=null;
		}
		select_obj=obj;
	}else{
		select_obj=null;
	}
	obj.style.visibility=status; 
}

function show_layer(num, name, email, url, bo_id, mb_id, admin) {
	var printHeight = 0;
	var printMain="";

	if(email) {
		printMain = "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=location.href='';><td style='font-family:±¼¸²;font-size:9pt;color:black' height=18 nowrap>&nbsp;<img src=/images/info_mail.gif border=0 align=absmiddle>&nbsp;&nbsp;¸ÞÀÏ º¸³»±â&nbsp;&nbsp;</td></tr>";
		printHeight = printHeight + 16;
	}
	if(url) {
		printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('http://"+url+"');><td style='font-family:±¼¸²;font-size:9pt;color:black' height=18 nowrap>&nbsp;<img src=/images/info_homepage.gif border=0 align=absmiddle>&nbsp;&nbsp;È¨ÆäÀÌÁö&nbsp;&nbsp;</td></tr>";
		printHeight = printHeight + 16;
	}
	{
		printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=location.href='board.asp?bo_id="+bo_id+"&skey=wr_name&sval="+name+"';><td style='font-family:±¼¸²;font-size:9pt;color:black' height=18 nowrap>&nbsp;<img src=/images/info_search.gif border=0 align=absmiddle>&nbsp;&nbsp;ÀÌ¸§À¸·Î °Ë»ö&nbsp;&nbsp;</td></tr>";
		printHeight = printHeight + 16;
	}
	if(mb_id) {
		printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('./member.asp?mode=view&mb_id="+mb_id+"');><td style='font-family:±¼¸²;font-size:9pt;color:black' height=18 nowrap>&nbsp;<img src=/images/info_information.gif border=0 align=absmiddle>&nbsp;&nbsp;È¸¿øÁ¤º¸ º¸±â&nbsp;&nbsp;</td></tr>";
		printHeight = printHeight + 16;
		printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=''><td style='font-family:±¼¸²;font-size:9pt;color:black' height=18 nowrap>&nbsp;<img src=/images/info_msg.gif border=0 align=absmiddle>&nbsp;&nbsp;ÂÊÁö º¸³»±â&nbsp;&nbsp;</td></tr>";
		printHeight = printHeight + 16;
		if(admin) {
			printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=open('./admin/member.asp?mode=form&w=e&mb_id="+mb_id+"');><td style='font-family:±¼¸²;font-size:9pt;color:black' height=18 nowrap>&nbsp;<img src=/images/info_modify.gif border=0 align=absmiddle>&nbsp;&nbsp;<font color=red>È¸¿øÁ¤º¸ º¯°æ&nbsp;&nbsp;</td></tr>";
			printHeight = printHeight + 16;
		}
	}
		
	var printHeader = "<div id='"+num+"' style='position:absolute; left:10px; top:25px; width:127; height: "+printHeight+"; z-index:1; visibility: hidden' onMousedown=sw_layer('"+num+"','hidden')><table border=0><tr><td colspan=3 onMouseover=sw_layer('"+num+"','hidden') height=3></td></tr><tr><td width=5 onMouseover=sw_layer('"+num+"','hidden') rowspan=2>&nbsp;</td><td height=5></td></tr><tr><td><table style=cursor:hand border='0' cellspacing='1' cellpadding='0' bgcolor='black' width=100% height=100%><tr><td valign=top bgcolor=white><table border=0 cellspacing=0 cellpadding=3 width=100% height=100%>";
	var printFooter = "</table></td></tr></table></td><td width=5 rowspan=2 onMouseover=sw_layer('"+num+"','hidden')>&nbsp;</td></tr><tr><td colspan=3 height=10 onMouseover=sw_layer('"+num+"','hidden')></td></tr></table></div>";

	document.writeln(printHeader+printMain+printFooter);
}

/*====================================================
 ÀÌ¹ÌÁö Å©°Ôº¸±â
------------------------------------------------------
 »ç¿ë¹ý : <img src="" onclick="this.src.popupView()">
=====================================================*/
String.prototype.popupView = function () {
	var x = x + 20;
	var y = y + 30;
	htmls = "<html><head><title>ÀÌ¹ÌÁö Å©°Ôº¸±â</title><style>body{margin:0;cursor:hand;}</style></head><body scroll=auto onload='width1=document.all.Timage.width;if(width1>1024)width1=1024;height1=document.all.Timage.height;if(height1>768)height1=768;top.window.resizeTo(width1+30,height1+54);' onclick='top.window.close();'><img src='"+ this +"' title='Å¬¸¯ÇÏ½Ã¸é ´ÝÈü´Ï´Ù.' name='Timage' id='Timage'></body></html>";
	imagez = window.open("", null, "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(htmls);
	imagez.document.close();
}

