function goClub(url)
{
	if(url.trim()) window.top.location.replace(url);
}

function Error_Login()
{
	alert("·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØÁÖ¼¼¿ä!");
}

function Error_Right()
{
	alert("µî±Þ ¹®Á¦·Î ±ÇÇÑÀÌ ¾ø½À´Ï´Ù. ¿î¿µÀÚ¿¡°Ô ¹®ÀÇÇÏ½Ã±â ¹Ù¶ø´Ï´Ù!");
}

function Error_Reply()
{
	alert("°øÁö±Û¿¡´Â ´äº¯±ÛÀ» ÀÛ¼ºÇÒ ¼ö ¾ø½À´Ï´Ù");
}

function Error_Comment()
{
	alert("±¸¸ÅÇÑ ÄÁÅÙÃ÷¸¸ ´ñ±Û ÀÛ¼ºÀ» ÇÒ¼öÀÖ½À´Ï´Ù.");
}

function searchMember()
{
	var width = 530;
	var height = 330;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join/search.php","search","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

//»õÃ¢
function openWin(url, target, w, h, s) 
{
	var winleft = (screen.width - w) / 2;
	var wintop = (screen.height - h) / 2 -35;
    var its = window.open(url,target,'width='+w+',height='+h+',top='+wintop+',left='+winleft+', scrollbars='+s); 
    its.focus();
}

function memberInfo(userid)
{
	var width = 500;
	var height = 500;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;	
	var modaless = window.open("/member/member/memberinfo.php?userid="+userid,"memberInfo","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function memberInfoClub(userid, clubid)
{
	var sleft = (screen.width - 500)/2;
	var stop = (screen.height - 500)/2-20;
	var modaless = window.open("/club/open/etc.php?clubid="+clubid+"&userid="+userid+"&todo=userinfo","","toolbar=no,status=no,width=500,height=500,top="+ stop +",left="+ sleft);
	modaless.focus();
}

function memo()
{
	var width = 600;
	var height = 600;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/memo/","memo","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function memo_write(userid)
{
	var width = 600;
	var height = 600;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;	
	var modaless = window.open("/memo/?todo=send_form&recv_userid="+userid,"memo","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function friend_insert(userid)
{
	var width = 508;
	var height = 250;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/member/friend.php?todo=add_form&target_userid="+userid,"friend","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function point_Give(userid)
{
	var width = 420;
	var height = 340;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;	
	var modaless = window.open("/member/point_give.php?todo=userpoint_give_form_popup&userid="+userid,"","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function point_Give_Club(clubid)
{
	var sleft = (screen.width - 400)/2;
	var stop = (screen.height - 300)/2-20;
	var modaless = window.open("/club/open/etc.php?clubid="+clubid+"&todo=point_Give_Club","","toolbar=no,status=no,width=400,height=300,top="+ stop +",left="+ sleft);
	modaless.focus();
}

function clubPublicPopup()
{
	var sleft = (screen.width - 480)/2;
	var stop = (screen.height - 476)/2-20;
	var modaless = window.open("/club/club_public_popup.php","cpublic","toolbar=no,status=no,width=480,height=476,top="+ stop +",left="+ sleft);
	modaless.focus();
}

function auth_adult()
{
	var width = 490;
	var height = 435;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;	
	var modaless = window.open("/member/member/auth_adult.php","auth","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}


document.write('<div id="memberLayer" style="position:absolute;display:none;"></div>');
function memberLayerView(userid) {	
	
	if(typeof document.all.memberLayer == "object") {

		X = event.clientX + document.body.scrollLeft-50;
		Y = event.clientY + document.body.scrollTop+10;
		document.all.memberLayer.style.top=Y;
		document.all.memberLayer.style.left=X;
		
		var contents;
		document.all.memberLayer.innerHTML = contents;
		document.all.memberLayer.style.display="";
	}
	return;
}

function memberLayerViewClub(userid, clubid) {	
	if(typeof document.all.memberLayer == "object") {
	
		X = event.clientX + document.body.scrollLeft-50;
		Y = event.clientY + document.body.scrollTop+10;
		document.all.memberLayer.style.top=Y;
		document.all.memberLayer.style.left=X;

		var contents;
		contents = '<table width="105" height="90" border="0" cellspacing="1">';
		contents += '	<tr>';
		contents += '		<td width="106" align="center" valign="middle" bgcolor="BBC6C6">';
		contents += '			<table width="103" height="88" border="0" cellpadding="1" cellspacing="0">';
		contents += '					<tr>';
		contents += '						<td align="center" valign="middle" bgcolor="#F7F7F7">';
		contents += '							<table width="101" height="86" border="0">';
		contents += '								<tr>';
		contents += '									<td height="15" align="center" valign="middle" bgcolor="#F7F7F7" class="style2">'+userid+'</td>';
		contents += '								</tr>';
		contents += '								<tr>';
		contents += '									<td height="72" align="center" valign="middle" bgcolor="#DEDEDE">';
		contents += '										<table width="99" height="72" border="0" cellpadding="0" cellspacing="0">';
		contents += '											<tr>';
		contents += '												<td align="left" bgcolor="#FFFFFF"><img src="/files/layer/side.gif" width="4" height="1"><a href="void(0);" onmousedown="memberInfoClub(\''+userid+'\',\''+clubid+'\');"><img src="/files/layer/layer_info.gif" width="60" height="13" onmouseover="this.src=\'/files/layer/layer_info_o.gif\'" onmouseout="this.src=\'/files/layer/layer_info.gif\'"></a></td>';
		contents += '											</tr>';
		contents += '											<tr>';
		contents += '												<td align="left" bgcolor="#FFFFFF"><a href="void(0);" onmousedown="memo_write(\''+userid+'\');"><img src="/files/layer/side.gif" width="4" height="1"><img src="/files/layer/layer_send.gif" width="70" height="10" onmouseover="this.src=\'/files/layer/layer_send_o.gif\'" onmouseout="this.src=\'/files/layer/layer_send.gif\'"></a></td>';
		contents += '											</tr>';
		contents += '											<tr>';
		contents += '												<td align="left" bgcolor="#FFFFFF"><a href="void(0);" onmousedown="point_Give(\''+userid+'\');"><img src="/files/layer/side.gif" width="4" height="1"><img src="/files/layer/layer_present.gif" width="79" height="10" onmouseover="this.src=\'/files/layer/layer_present_o.gif\'" onmouseout="this.src=\'/files/layer/layer_present.gif\'"></a></td>';
		contents += '											</tr>';
		contents += '											<tr>';
		contents += '												<td align="left" bgcolor="#FFFFFF"><a href="void(0);" onmousedown="friend_insert(\''+userid+'\');"><img src="/files/layer/side.gif" width="4" height="1"><img src="/files/layer/layer_add.gif" width="64" height="11" onmouseover="this.src=\'/files/layer/layer_add_o.gif\'" onmouseout="this.src=\'/files/layer/layer_add.gif\'"></a></td>';
		contents += '											</tr>';
		contents += '										</table>';
		contents += '									</td>';
		contents += '								</tr>';
		contents += '						</table>';
		contents += '					</td>';
		contents += '				</tr>';
		contents += '           	</table>';
		contents += '		</td>';
		contents += '	</tr>';
		contents += '</table>';

		document.all.memberLayer.innerHTML = contents;
		document.all.memberLayer.style.display="";
	}
	return;
}

function memberLayerHidden() {
	if(typeof document.all.memberLayer == "object" && document.all.memberLayer.style.display=="") 
		document.all.memberLayer.style.display="none";
}
document.onmousedown = memberLayerHidden;

