	/* =================================================================
	//	Âü    Á¶: ·¹ÀÌ¾îÀ§Ä¡
	//	ÀÛ ¼º ÀÏ: 2006.04.02 (¼öÁ¤¿Ï·á)
	================================================================= */

	var sel_obj;
	if(navigator.appName.charAt(0)=='N'){
		window.document.captureEvents(Event.MOUSEDOWN);
		window.document.onmousedown = capture;
	}

	function capture(e){
		newEvent = e;
	}

	function divhide(mode,num){
		document.getElementById(mode + 'UserLayer' + num).style.display = 'none';
	}

	function Layer_Show(mode, num, status) {
		var obj = document.getElementById(mode + 'UserLayer' + num);

		if(document.all) {
			obj.style.posLeft = event.clientX + document.body.scrollLeft - 13;
			obj.style.posTop  = event.clientY + document.body.scrollTop - 10;
		}
		else{
			obj.style.marginLeft = newEvent.pageX-20;
			obj.style.marginTop = newEvent.pageY-25;
		}

		if (status == 'block') {
			if(sel_obj) {
				sel_obj.style.display = 'none';
				sel_obj = null;
			}
			sel_obj = obj;

		} else sel_obj = null;

		obj.style.display = status;
	}


	/* =================================================================
	//	Âü    Á¶: ÀÏ¹Ý »ç¿ëÀÚ ¿ë
	//	ÀÛ ¼º ÀÏ: 2005.06.16
	================================================================= */

	function Layer_Box(sc, id, mode, num, db, email, myid, memb, homepage) {

		body  = '<div id=' + mode + 'UserLayer' + num + ' style="display:none;position:absolute;left:10px;top:25px;" onMouseLeave="Layer_Show(\''+ mode + '\', \'' + num + '\', \'none\')">';
		body += '<table border=0 cellpadding=0 cellspacing=0 width=120 bgcolor="FFFFFF" style="cursor:pointer;cursor:hand;">';
		body += '<tr>';
		body += '	<td>';
		body += '<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="CCCCCC">';
		body += '<tr>';
		body += '  <td>';
		body += '     <block width=1 height=1>';
		body += '  </td>';
		body += '</tr>';
		body += '<tr>';
		body += '  <td>';
		body += '  <table align="center" border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="F9F8F6">';

if(!document.all){
		body += '    <tr bgcolor=\'EFEFEF\'><td colspan="2"></td></tr>';
		body += '    <tr oncliCk="divhide(\''+ mode + '\', \'' + num + '\')">';
		body += '      <td colspan="2" bgcolor=\'EFEFEF\' align="right">';
		body += '        Layer Close <a href="javascript:void(0);"><img src="img/name_script/close.gif" border=0></a>';
		body += '      </td>';
		body += '    </tr>';
		body += '    <tr bgcolor=\'EFEFEF\'><td colspan="2"></td></tr>';
} // end if


// homepage
if(homepage){
		body += '<tr onmouseover="this.style.backgroundColor=\'#B6BCD2\';" style="BACKGROUND-COLOR: WHITE" onmouseout="this.style.backgroundColor=\'WHITE\';">';
		body += '   <td width="20" align=center height="20" bgcolor=DBD8D1>';
		body += '       <img src="./img/name_script/home.gif" border="0">';
		body += '   </td>';
		body += '   <td width="100" height="20">';
		body += '       &nbsp;&nbsp;<span style="font-size:9pt;"><a href="http://'+homepage+'" target="_new">È¨ÆäÀÌÁö</a></span>';
		body += '   </td>';
		body += '</tr>';
		body += '<tr>';
		body += '   <td width="120" colspan="2" bgcolor="#efefef">';
		body += '       <block width=1 height=1>';
		body += '   </td>';
		body += '</tr>';
}


// email
if(email){
		body += '<tr onmouseover="this.style.backgroundColor=\'#B6BCD2\';" style="BACKGROUND-COLOR: WHITE" onmouseout="this.style.backgroundColor=\'WHITE\';">';
		body += '   <td width="20" align=center height="20" bgcolor=DBD8D1>';
		body += '       <img src="./img/name_script/mail.gif" border="0">';
		body += '   </td>';
		body += '   <td width="100" height="20">';
		body += '       &nbsp;<a style="cursor: hand" onclick="window.open(\'./frem_add.php?myt=1&r_id=' + myid + '&r_memb=' + memb + '\',\'_mypage\',\'staus=no, width=350, height=330,scrollbars=yes,toolbar=no,menubar=no\');">';
		body += '			<span style="font-size:9pt;">¸ÞÀÏ º¸³»±â</span></a>';
		body += '   </td>';
		body += '</tr>';
		body += '<tr>';
		body += '   <td width="120" colspan="2" bgcolor="#efefef">';
		body += '       <block width=1 height=1>';
		body += '   </td>';
		body += '</tr>';
}


// message
if(myid > 0) {
		body += '<tr onmouseover="this.style.backgroundColor=\'#B6BCD2\';" style="BACKGROUND-COLOR: WHITE" onmouseout="this.style.backgroundColor=\'WHITE\';">';
		body += '   <td width="20" align=center height="20" bgcolor=DBD8D1>';
		body += '       <img src="./img/name_script/message.gif" border="0">';
		body += '   </td>';
		body += '   <td width="100" height="20">';
		body += '       &nbsp;<a style="cursor: hand" onclick="window.open(\'./frem_add.php?myt=3&r_id=' + myid + '&r_memb=' + memb + '\',\'_mypage\',\'scrollbar=no. staus=no, width=320, height=300\');">';
		body += '			<span style="font-size:9pt;">ÂÊÁö º¸³»±â</span></a>';
		body += '   </td>';
		body += '</tr>';
		body += '<tr>';
		body += '   <td width="120" colspan="2" bgcolor="#efefef">';
		body += '       <block width=1 height=1>';
		body += '   </td>';
		body += '</tr>';

// friend
		body += '<tr onmouseover="this.style.backgroundColor=\'#B6BCD2\';" style="BACKGROUND-COLOR: WHITE" onmouseout="this.style.backgroundColor=\'WHITE\';">';
		body += '   <td width="20" align=center height="20" bgcolor=DBD8D1>';
		body += '       <img src="./img/name_script/user.gif" border="0">';
		body += '   </td>';
		body += '   <td width="100" height="20">';
		body += '       &nbsp;&nbsp;<a style="cursor:pointer;cursor:hand;" onclick="window.open(\'./frem_add.php?myt=2&r_id=' + myid + '&r_memb=' + memb + '\',\'_mypage\',\'scrollbar=no. staus=no, width=350, height=100\');"><span style="font-size:9pt;">Ä£±¸ µî·Ï</span></a>';
		body += '   </td>';
		body += '</tr>';
		body += '<tr>';
		body += '   <td width="120" colspan="2" bgcolor="#efefef">';
		body += '       <block width=1 height=1>';
		body += '   </td>';
		body += '</tr>';


// profile
		body += '<tr onmouseover="this.style.backgroundColor=\'#B6BCD2\';" style="BACKGROUND-COLOR: WHITE" onmouseout="this.style.backgroundColor=\'WHITE\';">';
		body += '   <td width="20" align=center height="20" bgcolor=DBD8D1>';
		body += '       <img src="./img/name_script/profile.gif" border="0">';
		body += '   </td>';
		body += '   <td width="100" height="20">';
		body += '       &nbsp;&nbsp;<a style="cursor:pointer;cursor:hand;" onclick="window.open(\'gmboard.php?mode=view&r_memb=' + memb + '&id=' + id + '\',\'_profile\',\'scrollbar=no. staus=no, width=655, height=420\');"><span style="font-size:9pt;"><span style="font-size:9pt;">ÇÁ·ÎÇÊ º¸±â</span></a>';
		body += '   </td>';
		body += '</tr>';
		body += '<tr>';
		body += '   <td width="120" colspan="2" bgcolor="#efefef">';
		body += '       <block width=1 height=1>';
		body += '   </td>';
		body += '</tr>';
}


// id search
if((myid > 0) && (sc < 2) && db){
		body += '<tr onmouseover="this.style.backgroundColor=\'#B6BCD2\';" style="BACKGROUND-COLOR: WHITE" onmouseout="this.style.backgroundColor=\'WHITE\';">';
		body += '   <td width="20" align=center height="20" bgcolor=DBD8D1>';
		body += '       <img src="./img/name_script/name_search.gif" border="0">';
		body += '   </td>';
		body += '   <td width="100" height="20">';
		body += '       &nbsp;&nbsp;<a href="gmboard.php?mode=list&db=' + db + '&myid=' + myid + '" target=_new><span style="font-size:9pt;">¾ÆÀÌµð °Ë»ö</span></a>';
		body += '   </td>';
		body += '</tr>';
		body += '<tr>';
		body += '   <td width="120" colspan="2" bgcolor="#efefef">';
		body += '       <block width=1 height=1>';
		body += '   </td>';
		body += '</tr>';
}


		body += '</table>';
		body += '  </td>';
		body += '</tr>';
		body += '<tr>';
		body += '  <td>';
		body += '     <block width=1 height=1>';
		body += '  </td>';
		body += '</tr>';
		body += '</table>';


		body += '	</td>';
		body += '</tr>';
		body += '</table></div>';

		document.writeln(body);
	}