function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
   document.MM_sr=new Array;
    for(i=0;i<(a.length-2);i+=3){
		if ((x=MM_findObj(a[i]))!=null){
			document.MM_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src;
			x.src=a[i+2];
		}
	}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  var kkk;
  for (i=0; i<(args.length-2); i+=3)
	if ((obj=MM_findObj(args[i]))!=null) {
		v=args[i+2];
		if (obj.style) {
			kkk=obj;
			obj=obj.style;
			v=(v=='show')?'visible':(v='hide')?'hidden':v;
		}
    obj.visibility=v;
	obj.zIndex=999;
   }
//obj.visibility="hidden";
}

///////////// Lim ~////
function msg_popup(name,w,h,tempvalue){
	window.open('http://www.gamewa.com/New_Member/New_MsgPopup/New_'+name+'_Popup.asp?tempvalue='+tempvalue,name,'width='+w+',height='+h+',top=100,left=100');
}
function chat_popup(name,w,h,touser,tonick){
	window.open('http://www.gamewa.com/New_Member/New_ChatPopup/New_'+name+'_Popup.asp?touser='+touser+'&tonick='+tonick,'','width='+w+',height='+h+',top=100,left=100');
}
function mpchat_popup(name,w,h,touser,tonick){
	window.open('http://www.gamewa.com/New_MiniHome_Chat/Mp_Chat/New_'+name+'_Popup.asp?touser='+touser+'&tonick='+tonick,'invite','width='+w+',height='+h+',top=100,left=100');
}
function friend_popup(name,w,h,tempvalue){
	window.open('http://www.gamewa.com/New_Member/New_FriendPopup/New_'+name+'_Popup.asp?tempvalue='+tempvalue,'','width='+w+',height='+h+',top=100,left=100');
}

//////Lim~~~~~~~~ -_- Å¬¸¯½Ã ¸¶¿ì½º ±ôºýÀÌ´Â°Ô ÀÌ»óÇØ¼­ ÇÏ´Ü Ã³·³ ÇßÀ½. 
//// È£Ãâ ¹æ¹ý selectview('»ó´ë¹æ¾ÆÀÌµð', '»ó´ë¹æ´Ð³×ÀÓ', 'ÀÚ±â¾ÆÀÌµð', 'ÄÚµå¹øÈ£', '');"
var selectcode = '';
var sfrid = '',sfrnick='',smyid='',x,y,tmph,h,y, tmp2='';
function selectmenu(code){	//// ¼¿·ºÆ® ¸Þ´º ¸®½ºÆ® ÅØ½ºÆ®('¸Þ´ºÄÚµå')
	
	var selecttext = '';
	var youselecttext='';
	var myselecttext='';
	/// ¸Þ´ºº° »çÀÌÁî(°¡·Î±æÀÌ,¼¼·Î±æÀÌ,ÀÚ½ÅÀÏ¶§ »çÀÌÁî°ªÃß°¡,xÁÂÇ¥,yÁÂÇ¥)

/*	var lineimpact = ' style="cursor:hand;" onmouseover="this.style.textDecoration=\'underline\'" onmouseleave="this.style.textDecoration=\'none\'";';			// ¸µÅ© ÀÌº¥Æ®
	var spot = '<td width="8" style="padding-bottom:4px;padding-left:10px;"><img src="http://www.gamewa.com/New_common_img/selectmenu_spot.gif"></td>';			// Á¡ÀÌ¹ÌÁö
	var lineimg ='<tr><td align="center" colspan="3" style="padding-right:5px;"><img src="http://www.gamewa.com/New_common_img/drop_line.gif" width=89 height=1></td></tr>';
*/
	var lineimg = '<tr><td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td></tr>';

///¸Þ´º ºÎºÐ ½ÃÀÛ
		selecttext += '<div style="position:absolute;top:0;left:0;">';
		selecttext += '<table width="90" border="0" cellpadding="0" cellspacing="0" onmouseleave="selecthidden('+code+');">';
		selecttext += '<tr><td height="6" colspan="3"><img src="http://love.gamewa.com/New_Love_img/table_img05.gif" width="90" height="6"></td></tr>';
		selecttext += '<tr align="left"><td width="5" align="center" background="http://love.gamewa.com/New_Love_img/table_img02.gif"></td>';
			selecttext += '<td width="80" align="center"><table width="80" border="0" cellspacing="0" cellpadding="0">';

	if(code=='1'){		// °Ô½ÃÆÇ Çü½ÄÀÏ°æ¿ì + uid_text('selectyouid'+code) + uid_text('selectmyid'+code)
		youselecttext = selecttext + pro_text() + lineimg + msg_text() + lineimg + fri_text();
//		myselecttext  = selecttext + uid_text('selectmyid'+code) + minia_text() + myroom_text() + cash_text();
		myselecttext  = selecttext  + pro_text();
	}
	else if(code=='2'){	// ¹Ì´Ï¾ß Çü½ÄÀÏ°æ¿ì+ uid_text('selectyouid'+code)+ uid_text('selectmyid'+code)
		youselecttext = selecttext  + pro_text() +lineimg+ msg_text() +lineimg+ fri_text();
	//	myselecttext  = selecttext  + minia_text() +lineimg+ myroom_text() +lineimg+ cash_text();
		myselecttext  = selecttext  + myroom_text() +lineimg+ cash_text();
	}
	else if(code=='3'){ //+ uid_text('selectyouid'+code)+ uid_text('selectmyid'+code)
		youselecttext = selecttext  + pro_text() +lineimg+ msg_text() +lineimg+ fri_text();
		myselecttext  = selecttext  +  myroom_text() +lineimg+ avata_text() +lineimg+ cash_text();
	}

	myselecttext = "<div id='myselectmenu"+code+"' style='position:absolute;z-index:9999;top:-1000;left:0;display:none;'>"+myselecttext+"</table></td><td width='5' background='http://love.gamewa.com/New_Love_img/table_img03.gif'></td></tr>";
	myselecttext += "</tr><tr><td height='6' colspan='3'><img src='http://love.gamewa.com/New_Love_img/table_img06.gif' width='90' height='6'></td></tr></table></div></div>";

	youselecttext = "<div id='maselectmenu"+code+"' style='position:absolute;z-index:9999;top:-1000;left:0;display:none;'>"+youselecttext+"</table></td><td width='5' background='http://love.gamewa.com/New_Love_img/table_img03.gif'></td></tr>";
	youselecttext += "</tr><tr><td height='6' colspan='3'><img src='http://love.gamewa.com/New_Love_img/table_img06.gif' width='90' height='6'></td></tr></table></div></div>";
		document.write(youselecttext);
		document.write(myselecttext);
}

function selecthidden(code){eval("maselectmenu"+code).style.display = 'none';eval("myselectmenu"+code).style.display = 'none';}

function selectview(frid,frnick,myid,code,tmp2){
	sfrid = frid;
	sfrnick = frnick;
	smyid = myid;
	tmp2 = tmp2;
	if (tmp2 == '')
	{
	if(sfrid==smyid){
//		eval("selectmyid2").innerHTML = sfrid;
//		eval("selectmyid"+code).innerHTML = sfrid;
		eval("myselectmenu"+code).style.top=event.clientY-5+document.body.scrollTop;
		eval("myselectmenu"+code).style.left=event.clientX-5+document.body.scrollLeft;
		eval("maselectmenu"+code).style.display='none';
		eval("myselectmenu"+code).style.display='block';}
	else{
		//eval("selectyouid"+code).innerHTML = sfrid;
		eval("maselectmenu"+code).style.top=event.clientY-5+document.body.scrollTop;
		eval("maselectmenu"+code).style.left=event.clientX-5+document.body.scrollLeft;
		eval("maselectmenu"+code).style.display='block';
		eval("myselectmenu"+code).style.display='none';}
	}else if(tmp2 == 'right'){
//		eval("selectmyid"+code).innerHTML = sfrid;
		eval("myselectmenu"+code).style.top=event.clientY-5+document.body.scrollTop;
		eval("myselectmenu"+code).style.left=event.clientX-90+document.body.scrollLeft;
		eval("myselectmenu"+code).style.display='block';
	}
//alert(	eval("myselectmenu"+code).style.top + ":" + eval("myselectmenu"+code).style.top);
}

function uid_text(uidtext){				///1 ¾ÆÀÌµð ºÎºÐ
	var text='';
//	text  += '<tr><td height="24" style="background-color:#EEEEEE;font-weight:bold;color:#00517B;padding-left:10px;" colspan="3" id="'+uidtext+'">'+sfrid+'</td></tr>';	//´Ð³×ÀÓ
//	text += '<tr><td height="3"></td><td width="89"></td><td></td></tr>';
	return text;
}

function pro_text(){		///2ÇÁ·ÎÇÊ ÅØ½ºÆ®---
	var text='';
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_09.gif" name="memini2" width="80" height="21" border="0" onclick="MiniHompy(sfrid,\'profile\');" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini2\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_09ov.gif\',1);"></td>';
	text += '</tr>';
	return text;
}

function msg_text(){		///3¸Þ¼¼Áö ÅØ½ºÆ®
	var text='';
	//ÂÊÁöº¸³»±â
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu3_02.gif" name="memini31" width="80" height="21" border="0" onclick="action_pop(sfrid,1);" style="cursor:hand;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini31\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu3_02ov.gif\',1);"></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td>';
	text += '</tr>';

	//1:1´ëÈ­½ÅÃ»
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu3_03.gif" name="memini32" width="80" height="21" border="0" onclick="chat_popup(\'ChatQuestion\',289,185,sfrid,sfrnick);" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini32\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu3_03ov.gif\',1);"></td>';
	text += '</tr>';

	return text;
}

function fri_text(){		///4ÇÁ·»µå ÅØ½ºÆ®
	var text='';
	//Ä£±¸Ãß°¡
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu3_04.gif" name="memini41" width="80" height="21" border="0" onclick="friend_add(sfrid);" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini41\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu3_04ov.gif\',1);"></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td>';
	text += '</tr>';

	//ÇÁ·ÎÆ÷ÁîÇÏ±â
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu3_05.gif" name="memini42" width="80" height="21" border="0" onclick="propose_send(sfrid);" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini42\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu3_05ov.gif\',1);"></td>';
	text += '</tr>';

	return text;
}

function myroom_text(){		///5¿ÊÀåµé ÅØ½ºÆ®
	var text='';
	//³»¿ÊÀå°¡±â
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_07.gif" name="memini51" width="80" height="21" border="0" onclick="Miniya();" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini51\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_07ov.gif\',1);"></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td>';
	text += '</tr>';

	//³»Ä£±¸ÇÔ
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_06.gif" name="memini52" width="80" height="21" border="0" onclick="MyFriend();" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini52\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_06ov.gif\',1);"></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td>';
	text += '</tr>';

	//³» ÂÊÁöÇÔ
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_02.gif" name="memini53" width="80" height="21" border="0" onclick="MyMessage();" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini53\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_02ov.gif\',1);"></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td>';
	text += '</tr>';

	// ÇÁ·ÎÇÊ
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_03.gif" name="memini2" width="80" height="21" border="0" onclick="MiniHompy(sfrid,\'profile\');" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini2\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_03ov.gif\',1);"></td>';
	text += '</tr>';
	return text;
}

function cash_text(){				///6Ä³½¬ ÅØ½ºÆ®
	var text='';
	//¹Ì¸£Ä³½¬ÃæÀü
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_04.gif" name="memini61" width="80" height="21" border="0" onclick="MyCashRefil();" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini61\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_04ov.gif\',1);"></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td height="1"><img src="http://love.gamewa.com/New_Love_img/table_line.gif" width="80" height="1"></td>';
	text += '</tr>';


	//³»Á¤º¸º¯°æ
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_05.gif" name="memini62" width="80" height="21" border="0" onclick="MyInfo();" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini62\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_05ov.gif\',1);"></td>';
	text += '</tr>';

	return text;
}

function avata_text(){				///7¾Æ¹ÙÅ¸ ÅØ½ºÆ®
	var text='';
//	text  = '<tr><td height="20"><A onclick="tavata_face();" >Ç¥Á¤¹Ù²Ù±â</td><td></td></tr>';

	//¾Æ¹ÙÅ¸¼îÇÎ
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_08.gif" name="memini7" width="80" height="21" border="0" onclick="MirAvata();" style="cursor:hand;" ';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini7\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_08ov.gif\',1);"></td>';
	text += '</tr>';

	return text;
}

function minia_text(){				///8¹Ì´Ï¾Æ ÅØ½ºÆ®  ----
	var text = '';
	text += '<tr>';
	text += '<td><img src="http://love.gamewa.com/New_Love_img/table_menu2_01.gif" name="memini8" width="80" height="21" border="0" onclick="Miniya();" style="cursor:hand;"';
	text += 'onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'memini8\',\'\',\'http://love.gamewa.com/New_Love_img/table_menu2_01ov.gif\',1);"></td>';
	text += '</tr>';
	return text;
}


function ShotView(imgsrc){	
	document.images["imgsrc"].src = imgsrc;
	eval("shotview").style.top = event.clientY+document.body.scrollTop-175;
	eval("shotbgline").style.top = event.clientY+document.body.scrollTop-219;
	eval("shotview").style.left = event.clientX+document.body.scrollLeft+10;
	eval("shotbgline").style.left = event.clientX+document.body.scrollLeft+6;	
	eval("shotview").style.display = "block";
	eval("shotbgline").style.display = "block";
}

function ShotHide(){
	eval("shotview").style.display = "none";
	eval("shotbgline").style.display = "none";
//	eval("shotview").style.top = -1000;
//	eval("shotview").style.left = 0;
}

function TitleView(number){
	eval("marquee_ex"+number).style.display = "block";
}

function TitleHide(number){
	eval("marquee_ex"+number).style.display = "none";
}		

function ShotWrite(){
	var text = '';
	text += '<div id="shotview" name="shotview" style="position:absolute;z-index:9998;top:-1000;left:0;display:none;">';
	text += '<table width="251" height="171" border="0" cellspan="0" cellpadding="0"><tr><td><img src="http://img.gamewa.com/Arcade_Img/New_img/wwww.gif" name="imgsrc" width="251" height="171"></td></tr></table></div>';
	text += '<div id="shotbgline" name="shotbgline" style="position:absolute;z-index:9999;top:-1000;left:0;display:none;">';
	text += '<table width="179" height="259" border="0" cellspan="0" cellpadding="0"><tr><td width="179" height="259"><img src="http://img.gamewa.com/Arcade_Img/New_img/game_view_bgline.gif" width="259" height="179" border="0"></td><tr></table></div>';

	document.write(text);
}

