
//ActiveX ¿¡·¯Ã¢
function popUpError(str)
{

	w = 350;
	h = 240;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.title.value = '¿¡·¯';
	doc.evtFrm.msg.value = str;
	doc.evtFrm.btype.value = '1';
	doc.evtFrm.target= 'pop_err';
	doc.evtFrm.action = '/XVMMain/chat/chat_error.aspx';
	
	var oWin = window.open('','pop_err','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
	
	doc.evtFrm.submit();


}

function popUpChatError(str)
{

	w = 350;
	h = 200;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.title.value = '¿¡·¯';
	doc.evtFrm.msg.value = str;
	doc.evtFrm.btype.value = '1';
	doc.evtFrm.target= 'pop_err';
	
	doc.evtFrm.action = '/XVMMain/chat/chat_error.aspx';
	
	
	var oWin = window.open('','pop_err','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
	
	doc.evtFrm.submit();
		

}



//¹ÞÀº ¸Þ½ÃÁö º¸±â
function popUpViewMsg(id, type)
{
	w = 380;
	h = 310; 
	//h = 390; // ie7.0 ¶§¹®¿¡...
	
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	doc = document.all;
	doc.evtFrm.id.value = id;
	doc.evtFrm.type.value = type;
	doc.evtFrm.target= 'view_msg';
	doc.evtFrm.action = '/XVMMain/message/receive_message.aspx';
		
	var oWin = window.open('','view_msg','scrollbars=no, resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	//try{ oWin.focus(); }catch(Exception){ alert('error');}

	doc.evtFrm.submit();

}


//ÃÊ´ë È®ÀÎ ÆË¾÷Ã¢
function popUpInvite(data, type){
	w = 230;
	h = 190;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.data.value = data;
	doc.evtFrm.type.value = type;
	doc.evtFrm.target= 'pop_invite';
	doc.evtFrm.action = '/XVMMain/chat/invite_message.aspx';
	
	
	var oWin = window.open('','pop_invite','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
	
	
	doc.evtFrm.submit();

}

function popUpDateRequest(data){
	w = 230;
	h = 190;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.data.value = data;
	doc.evtFrm.target= 'pop_date';
	doc.evtFrm.action = '/XVMMain/chat/date_request.aspx';
	
	
	var oWin = window.open('','pop_date','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
	
	
	doc.evtFrm.submit();

}

//¼±¹°¹ÞÀº ¾ÆÀÌÅÛ º¸±â
function popUpViewMsgWithItem(id)
{
	w = 381;
	h = 300;
		
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	doc = document.all;
	doc.evtFrm.id.value = id;
	doc.evtFrm.target= 'receive_item';
	doc.evtFrm.action = '/XVMMain/item/receive_item.aspx';
		
	var oWin = window.open('','receive_item','scrollbars=1, resizable=no,width=381,height=300, status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
		
	doc.evtFrm.submit();
}

//¹æÁ¤º¸º¯°æÃ¢ ¶ç¿ì±â
function popUpChangeRoomInfo(data){
	
	w = 450;
	h = 260;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.data.value = data;
	doc.evtFrm.target= 'changeRoomInfo';
	doc.evtFrm.action = '/XVMMain/chat/change_room_info.aspx';
	
	
	var oWin = window.open('','changeRoomInfo','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp + ',alwaysLowered');
	try{ oWin.top(); oWin.focus(); }catch(Exception){}
	doc.evtFrm.submit();
	
}

//À¯ÀúÁ¤º¸ º¯°æÃ¢ ¶ç¿ì±â
function popUpChangeUserInfo(data){
	
	w = 350;
	h = 200;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.data.value = data;
	doc.evtFrm.target= 'changeUserInfo';
	doc.evtFrm.action = '/XVMMain/chat/change_user_info.aspx';
	
	var oWin = window.open('','changeUserInfo','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
	doc.evtFrm.submit();
	
}

//´ë±âÀÚ ¸®½ºÆ®Ã¢ ¶ç¿ì±â
function popUpWaitingList(data){
	w = 500;
	h = 450;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.data.value = data;
	doc.evtFrm.target= 'pop_wait';
	doc.evtFrm.action = '/XVMMain/chat/wait_list.aspx';
	
	
	var oWin = window.open('','pop_wait','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){ alert('error');}
	
	doc.evtFrm.submit();
	
}



//ÀÌ¹ÌÁö ¿Ã¸®±â Ã¢
function popUpUploadImage(id)
{
	w = 352;
	h = 287;
	
	
	
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	doc = document.all;
	doc.evtFrm.id.value = id;
	doc.evtFrm.target= 'popupimage';
	doc.evtFrm.action = '/XVMMain/chat/chat_image.aspx';
	
	var oWin = window.open('','popupimage','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{oWin.focus(); }catch(Exception){}
	doc.evtFrm.submit();
	
	a=popUpUploadImage.arguments; 
	if(a.length == 2)
		oWin.opener = opener;

}

//¹Ì´ÏÈ¨ÇÇ Ã¢ ¶ç¿ì±â
function popUpMiniHompy(id){

	target = 'mini_hompy' + id;
	
	w = 902;
	h = 650;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	/*doc = document.all;
	doc.evtFrm.id.value = id;
	doc.evtFrm.gift.value = '0';
	doc.evtFrm.target = target;
	doc.evtFrm.action = '/XVMMain/hompy/hompy.aspx';
	*/
	
	
	var oWin = window.open('/XVMMain/hompy/hompy.aspx?id=' + id + '&gift=0',target,'resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	
	//var oWin = window.open('',target,'resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{oWin.focus(); }catch(Exception){}
	//doc.evtFrm.submit();
	
	
}

//¼±¹° ¸®½ºÆ® ÆË¾÷
function popUpGiftPage(toid)
{

	target = 'mini_hompy' + toid;
	
	w = 902;
	h = 650;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	/*doc = document.all;
	doc.evtFrm.id.value = toid;
	doc.evtFrm.gift.value = '1';
	doc.evtFrm.target = target;
	doc.evtFrm.action = '/XVMMain/hompy/hompy.aspx';
	*/
	
	var oWin = window.open('/XVMMain/hompy/hompy.aspx?id=' + toid + '&gift=1',target,'resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	
	
	//var oWin = window.open('',target,'resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{oWin.focus(); }catch(Exception){}
	//doc.evtFrm.submit();
	
		
}


//È­»óÃ¤ÆÃ µµ¿ò¸»
function popUpChatHelp()
{
	w = 571;
	h = 400;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	//var oWin = window.showModalDialog ("/XVMMain/help/help_chat.htm","chat_help", 'dialogLeft:' + lp + ' px; dialogTop:' + tp + ' px; dialogWidth:' + w + ' px; dialogHeight:' + h + ' px; scroll:0; help:0; status:0');
	
	
	
	var oWin = window.open('/XVMMain/help/help_chat.htm','chat_help','scrollbars=1, resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{oWin.focus(); }catch(Exception){}
	
}

function popUpEyeItem()
{

		w = 311;
		h = 420;
		lp = (screen.width) ? (screen.width-w)/2 : 0;
		tp = (screen.height) ? (screen.height-h)/2 : 0;
		
		doc = document.evtFrm;
		doc.id.value = 'ITEMEYE';
		
		doc.target= 'buy_magic_item';
		doc.action = '/XVMMain/item/buy_magic_item.aspx';
		
		var oWin = window.open('','buy_magic_item','resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
		try{ oWin.focus(); }catch(Exception){}
		
		doc.submit();
		
		doc.target = '';
		
}

function isOverXPSP2()
{
	  var strVerStr = window.navigator.appVersion;
	  var arrVerStr = strVerStr.split('; ');
	  if (arrVerStr.length >= 4)
	  {
	    // arrOsVer Example
	    // Windows NT 5.1
	    var arrOsVer = arrVerStr[2].split(' ');
	    if (arrOsVer.length >= 3 && arrOsVer[0] == "Windows")
	    {
	      var osVerNum = new Number(arrOsVer[2]);
	      // »õ·Î¿î Windows Version ³ª¿Ã¶§ ¼öÁ¤ÇÊ¿ä
	      if (osVerNum >= 5.1 && strVerStr.indexOf("SV1") >= 35 )
	        return true;
	    }
	  }
	
	  return false;
}

function popUpHangok(id)
{
	w = 480;
	h = 600;
	lp = (screen.width) ? (screen.width-w)/2 : 0;
	tp = (screen.height) ? (screen.height-h)/2 : 0;
	
	//var oWin = window.open('/XVMMain/help/help_chat.htm','chat_help','scrollbars=no, resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	var oWin = window.open('/XVMMain/hangok/hangok.aspx?id='+id,'hangok','scrollbars=no,resizable=no,width=' + w + ',height=' + h + ', status=no, top='+tp+',left='+lp);
	try{ oWin.focus(); }catch(Exception){}
	//doc.evtFrm.submit();

}
