function Error_Login()
{
	alert("·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØÁÖ¼¼¿ä!");
}

function Error_Right()
{
	alert("È¸¿øµî±Þ ¹®Á¦·Î ±ÇÇÑÀÌ ¾ø½À´Ï´Ù. »çÀÌÆ® ¿î¿µÀÚ¿¡°Ô ¹®ÀÇÇÏ¼¼¿ä!");
}

function Error_Reply()
{
	alert("°øÁö±Û¿¡´Â ´äº¯±ÛÀ» ÀÛ¼ºÇÒ ¼ö ¾ø½À´Ï´Ù");
}


//  ºñ¹Ð¹øÈ£ Ã£±â
function searchMember()
{
	var width = 500;
	var height = 420;
	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 searchID()
{
	var width = 500;
	var height = 350;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join/search_id.php","search","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}


function activexPopup()
{
	var width = 500;
	var height = 450;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/append/application/passive.php","passive","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

// ·Î±×ÀÎ ÆË¾÷ Ã¢
function loginPopup()
{
	var width = 350;
	var height = 280;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/login/?pmode=popup","loginpopup","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/?pmode=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("/friend/friend.php?pmode=add_form&target_userid="+userid,"friend","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function storagePopup()
{
	var width = 818;
	var height = 800;
	var width_start = 300;
	var height_start = 300;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/content/content.php?pmode=form_write","storage_form","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}

function storagePopupMem()
{
	var width = 818;
	var height = 800;
	var width_start = 300;
	var height_start = 300;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/content/member_content.php?pmode=form_write","storage_form","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}

function storageViewPopup(idx)
{
	var idx = idx;
	var width = 818;
	var height = 820;
	var width_start = 300;
	var height_start = 300;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/content/content.php?pmode=view&idx="+idx,"storage_view","width="+width_start+",height="+height_start+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}

function requestPopup(idx)
{
	var width = 818;
	var height = 750;
	var width_start = 300;
	var height_start = 300;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/content/content.php?pmode=form_write&idx_request="+idx,"storage_form","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}

function itemusePopup(loc)
{
	var loc=loc;
	var width = 500;
	var height = 400;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/mypage/seller_item.php?pmode=popup_use_form&loc="+loc,"popup_item","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function itembuyPopup()
{
	var idx = idx;
	var width = 500;
	var height = 580;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/mypage/seller_item.php?pmode=popup_buy_form","popup_item","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function HelpPopupSellerContents(pmode)
{
	var idx = idx;
	var pmode = pmode;
	var width = 708;
	var height = 580;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/mypage/seller_popupinfo.php?pmode="+pmode,"popup_seller_info","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}



function couponGiftPopup()
{
	var width = 500;
	var height = 400;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/popup/mypage_gift.php?pmode=mypage_gift","mypage_gift","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

// ÆË¾÷Ã¢ ´Ý±â¸¦ À§ÇØ Àü¿ªÀ¸·Î ¼±¾ð
var modaless2;
function Searchnick(where)
{
	var width = 450;
	var height = 450;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var where = where;
	modaless2 = window.open("/popup/mypage_search_nick.php?pmode=mypage_search_nick&where="+where,"mypage_search_nick","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless2.focus();
}

function changePoint()
{
	var width = 400;
	var height = 250;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/popup/mypage_point.php?pmode=mypage_point","mypage_point","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function changeCash()
{
	var width = 500;
	var height = 650;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/popup/mypage_cash.php?pmode=mypage_cash","mypage_cash","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}
//¼ºÀÎÃ¼Å©ÆË¾÷
function adultPopup()
{
	var width = 500;
	var height = 400;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/popup/adult.php","adultCheck","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 zipCodePopup()
{
	var width = 430;
	var height = 300;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;	
	var modaless = window.open("/popup/zipcode.php","zipCode","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}



function keyPopup()
{
	var width = 775;
	var height = 800;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/recom/key_popup.php","keypopup","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}



function termPopup()
{
	var width = 775;
	var height = 800;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/customer/term_extention.php","keypopup","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}



function couponUsePopup()
{
	var width = 775;
	var height = 800;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/company/coupon_use_desc.php","keypopup","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}

function cpaPopup()
{
	var width = 450;
	var height = 582;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join/cpa_check.php","cpapopup1","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function cpaPopupNew()
{
	var width = 450;
	var height = 635;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join_cpa2/join.cpa2.php","cpapopup1","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

function cpaAgree()
{
	var width = 550;
	var height = 650;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join/free_agree.php","free_ageree","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

// CPSÆË¾÷ 
function cpsPopup()
{
	var width = 100;
	var height = 100;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/free_member_join_popup.php","free_cps_fs","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=yes");
	modaless.focus();
}

// CPSÆË¾÷ 
function cpsResult()
{
	var width = 450;
	var height = 582;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join/check_result_phone.php","cpspopup2","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}

// ÆÄÆ®³Ê ½Ã°£º° Åë°è
function timeLogCheck(str)
{
	var width = 800;
	var height = 700;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/proceeds_time.php?date="+str,"cpapopup","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}


//  ºñ¹Ð¹øÈ£ Ã£±â
function part_searchMember()
{
	var width = 500;
	var height = 420;
	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 part_searchID()
{
	var width = 500;
	var height = 350;
	var winleft = (screen.width - width) / 2;
	var wintop = (screen.height - height) / 2 -20;
	var modaless = window.open("/join/search_id.php","search","width="+width+",height="+height+",top="+wintop+",left="+winleft+",scrollbars=no");
	modaless.focus();
}


// È¸¿ø Á¦ÀçÃ¢
function penalty_popup_div(userid)
{
	var userid = userid;
	var rsize_width = 916;
	var rsize_height = screen.height;
	try {
		var info = window.clientInformation;
		var reg1 = /[^A-Z0-9]MSIE[ ]+7.0[^A-Z0-9]/i;
		if(reg1.test(info.userAgent) == true) 
			rsize_height += 20;
	}
	catch(e) {
	}
    newWindow('/access/penalty/penalty.php?pmode=new&userid='+userid, 'cb_penalty', rsize_width, rsize_height,true);
}

//ÆÇ¸Å ÀÚ·á º¸±â  - gyu
function find_by_id(userid){
	var userid = userid;
	var rsize_width = 700;
	var rsize_height = 700;
	try{
		var info = window.clientInformation;
		var reg1 = /[^A-Z0-9]MSIE[ ]+7[^A-Z0-9]/i;
		if(reg1.test(info.userAgent) == true)
			rsize_height += 20;
	}catch(e){

	}
	newWindow('/content/pop_list.php?userid=' + userid, 'pop_list', rsize_width, rsize_height, true);
}


// ÀüÃ¼ Ã¼Å©
function chkAll(obj)
{
	if(obj==null)
	{
		// Ã¼Å©¹Ú½º ¾øÀ»¶§
	}
	else if(obj.value==undefined)
	{
		// Ã¼Å©¹Ú½º°¡ 2°³ÀÌ»ó
		for(var i=0; i<obj.length; i++ ) {
			obj[i].checked = true;
		}
	}
	else
	{
		// Ã¼Å©¹Ú½º ÇÏ³ªÀÏ¶§
		obj.checked=true;
	}
}

// Ã¼Å©ÇØÁ¦
function unChkAll(obj)
{
	if(obj == null)
	{
		// Ã¼Å©¹Ú½º ¾øÀ»¶§
	}
	else if(obj.value==undefined)
	{
		// Ã¼Å©¹Ú½º°¡ 2°³ÀÌ»ó
		for(var i=0; i<obj.length; i++ ) {
			obj[i].checked = false;
		}
	}
	else
	{
		// Ã¼Å©¹Ú½º ÇÏ³ªÀÏ¶§
		obj.checked=false;
	}
}






document.write('<div id="memberLayer" style="position:absolute;display:none;"></div>');

function memberLayerView(userid, usernick, e) {	
	if(typeof document.all.memberLayer == "object") {
	
		X = e.clientX + document.body.scrollLeft-50;
		Y = e.clientY + document.body.scrollTop+10;
		document.all.memberLayer.style.top=Y;
		document.all.memberLayer.style.left=X;

		var contents;
		contents = '<table width="120" border="0" cellspacing="1" cellpadding="1" bgcolor="#F6F6F6">';
		contents += '	<tr>';
		contents += '		<td bgcolor="#FFFFFF" align="center" valign="top">';
		contents += '			<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#D8D8D8">';
		contents += '				<tr>';
		contents += '					<td bgcolor="#FFFFFF" align="center" valign="top">';
		contents += '						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_m_over">';
		contents += '							<tr>';
		contents += '								<td height="25" bgcolor="#FAFAFA" style="padding-left:6px;"><b>'+usernick+'</b></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F4F4F4"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#D8D8D8"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#FFFFFF"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="22" style="padding-left:6px;"><a href="javascript:memo_write(\''+userid+'\');">ÂÊÁöº¸³»±â</a></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="22" style="padding-left:6px;"><a href="javascript:friend_insert(\''+userid+'\');">Ä£±¸Ãß°¡</a></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></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 memberLayerView_admin(userid, usernick, e) {	
	if(typeof document.all.memberLayer == "object") {
	
		X = e.clientX + document.body.scrollLeft-50;
		Y = e.clientY + document.body.scrollTop+10;
		document.all.memberLayer.style.top=Y;
		document.all.memberLayer.style.left=X;

		var contents;
		contents = '<table width="120" border="0" cellspacing="1" cellpadding="1" bgcolor="#F6F6F6">';
		contents += '	<tr>';
		contents += '		<td bgcolor="#FFFFFF" align="center" valign="top">';
		contents += '			<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#D8D8D8">';
		contents += '				<tr>';
		contents += '					<td bgcolor="#FFFFFF" align="center" valign="top">';
		contents += '						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_m_over">';
		contents += '							<tr>';
		contents += '								<td height="25" bgcolor="#FAFAFA" style="padding-left:6px;"><b>'+usernick+'</b></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F4F4F4"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#D8D8D8"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#FFFFFF"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="22" style="padding-left:6px;"><a href="javascript:memo_write(\''+userid+'\');">ÂÊÁöº¸³»±â</a></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="22" style="padding-left:6px;"><a href="javascript:friend_insert(\''+userid+'\');">Ä£±¸Ãß°¡</a></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="22" style="padding-left:6px;"><a href="javascript:penalty_popup_div(\''+userid+'\');">Á¦Àç°ü¸®</a></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#f5f5f5"></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="22" style="padding-left:6px;"><a href="javascript:find_by_id(\'' + userid + '\');">ÆÇ¸ÅÀÚ·áº¸±â</a></td>';
		contents += '							</tr>';
		contents += '							<tr>';
		contents += '								<td height="1" bgcolor="#F5F5F5"></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";

	if(document.all.appLayer) document.all.appLayer.style.display='none';
}

document.onmouseup = memberLayerHidden;

