function k_Popup(url,target,flag) 
 { 
   var objPopup = window.open(url,target,flag); 
   if (objPopup == null) 
   { 
     document.write("<object id='DHTMLEdit' classid='clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A' width='1' height='1' align='middle'><PARAM NAME='ActivateApplets' VALUE='1'><PARAM NAME='ActivateActiveXControls' VALUE='1'></object>"); 
     setTimeout('k_Popup2("'+url+'","'+target+'","'+flag+'")', 500); 
   } 
 } 
 
 function k_Popup2(url,target,flag) 
 { 
   try 
   { 
     DHTMLEdit.DOM.Script.execScript('window.open("'+url+'","'+target+'","'+flag+'")'); 
   } 
   catch (e) 
   { 
	 window.open(url, target, flag);    	   	 
     // DHTML ActiveX ±îÁ¤ ¾øÀ»¶§ ^^ 
   } 
 } 
 
function new_win(filename,p_name,s_width,s_height,s_scrol)
{
	x = screen.width;
	y = screen.height;
	wid = (x / 2) - (s_width / 2);
	hei = (y / 2) - (s_height / 2);
var gamewawin =
   window.open(filename, p_name, "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=" + s_scrol + ",width=" + s_width + ",height=" + s_height + ",top=" + hei + ",left=" + wid + ",scrolbar=no"); 
gamewawin.focus();
}

function new_win2(filename,p_name,s_width,s_height,s_scrol)
{
	x = screen.width;
	y = screen.height;
	wid = (x / 5) - (s_width / 5);
	hei = (y / 5) - (s_height / 5);
var gamewawin =
   window.open(filename, p_name, "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=no,width=" + s_width + ",height=" + s_height + ",top=" + hei + ",left=" + wid); 
gamewawin.focus();
}


//½Å°íÆË¾÷
function ToPolice(sphe, getUserId){
	new_win('/customer/pop_police.asp?sphe='+ sphe +'&baduserlist='+getUserId,'new_baduser','380','360','0');
}

function avata_send(nextpage)
{
	switch(nextpage)
	{
		case "rmsg":
			document.location.href="/customer/myinfo/myinfo_sendmsg.asp?kind=send&code=6";
		break;

		case "smsg":
			new_win('/chat/message/sendMessage.asp','msgwin','391','269','0'); 
		break;

		case "rcash":
			document.location.href="/cash/cash_main.asp"; 
		break;

		case "scash":
			new_win('/cash/cash_filling.asp', 'cash_filling', 403, 545, 'no'); 
		break
	}
}


function Login(){
	var form=document.LoginForm;
	if(!form.UserID.value)
	{
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		form.UserID.focus();
		return false;
	}
	if(!form.PassWord.value)
	{
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		form.PassWord.focus();
		return false;
	}
	
	var md=MD5(form.PassWord.value);
	form.PassWord.value=md;
	

	return true;
}

function PwdFind(value){
	if(value=='id')
	{
		new_win( 'http://www.gamewa.com/member/findid.asp', 'IDPwFind', 410, 288, 'no');
	}else if(value=='pw'){
		new_win( 'http://www.gamewa.com/member/findpwd.asp', 'IDPwFind', 410, 325, 'no');
	}
	
}

function RegMem(){
	document.location.href='http://www.gamewa.com/member/mem_userule.asp'
}

function notice_pop(mode, nsphe, nidx)
{
	var pagestr	
	if(mode=="view")
	{
		pagestr="http://www.gamewa.com/customer/sub/notice_popview.asp?nidx="+nidx+"&nsphe="+nsphe+"&ncsph=notice"

	}
	else if(mode=="faqview")
	{
		pagestr="http://www.gamewa.com/customer/sub/notice_popview.asp?nidx="+nidx+"&nsphe="+nsphe+"&ncsph=FAQ"

	}
	else if(mode=="faqlist")
	{
		pagestr="http://www.gamewa.com/customer/sub/notice_poplist.asp?nordername=regDate&nsphe="+nsphe+"&ncsph=FAQ"

	}
	else
	{
		pagestr="http://www.gamewa.com/customer/sub/notice_poplist.asp?nordername=regDate&nsphe="+nsphe+"&ncsph=notice"
	}
				new_win(pagestr,'notice','550','413','0');	
}

//Ã¤ÆÃ ¼ö½ÅÈ¯°æ¼³Á¤
function SetUpRcv(){
	new_win('/chat/sub/chatSetup.asp', 'setuprcv','320','252','0');
}
function MiniHompy(userid,page,code1){
//	return;
//	alert('asfadsfasfd');
	if(page==''||page==undefined){page = 'Profile';}	// ÇöÀç ±âº»Àº ÇÁ·ÎÇÊ
	if(code1==''||code1==undefined){code1 = '';}		// ÇÁ·¹ÀÓ°ª ºñ¾úÀ¸¸é.. ºñ¿ò
	new_win('http://mp.gamewa.com/Mp_MiniHome/New_Mp_Main.asp?pagename='+page+'&Hompyid='+userid+'&code1='+code1 ,'MiniHompy' ,'922','570','0');
}
//È¨ÇÇ°Ô½ÃÆÇ ÀÌµ¿
function GoHompyBoard(hompyId, type, id){
	new_win('/hompy/sub/mini_main.asp?Hompyid='+hompyId+'&bdType='+type+'&bdID='+id,'MiniHompy','900','630','0');
}
function limpop(page,w,h){
	window.showModalDialog( page , window, "dialogWidth:"+w+"px; dialogHeight:"+h+"px; center:yes; status:no; resizeable:no; scroll:no; help:no;");
}

function MyMessage(){
window.open('http://www.gamewa.com/New_Member/New_MsgPopup/New_MemoBox_Popup.asp', 'MemoBox', 'width=389, height=336, left=250, top=150');
}
function MyCashRefil(){
	window.open("http://Love.gamewa.com/New_Cash/New_Cash_Main.asp",  "Cash","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,width=530,height=454,top=50,left=100,scrolbar=no");
}
function action_pop(frid,code){
if('<%=getuserid%>' !=''){
	action.location.href='http://www.gamewa.com/New_Member/New_MsgPopup/Asp_include/New_MsgSend_State.asp?frid='+frid+'&code='+code;}
else{alert('·Î±×ÀÎÇØÁÖ¼¼¿ä');}
}
function friend_add(frid){
limpop('http://www.gamewa.com/New_Member/New_FriendPopup/New_Modal_Popup.asp?pagename=FriendAdd&code='+frid+'&w=300&h=231','300','231')
}
