		//----------------------------------------------------------------------------
		// ½ºÅ¸ÅÍ È¤Àº ´Ù¿î·Îµå ÆäÀÌÁö¿¡¼­ »ç¿ëÇÏ´Â iframe
		//----------------------------------------------------------------------------
		document.write('\
				<div style="position:absolute;top:-10000px;left:-10000px;"> \
				<iframe name="hiddenClientDownload" width="40" height="40"></iframe>\
				</div>\
		');
		//----------------------------------------------------------------------------

		function f_modal(furl, fparam1, fparam2, nWidth, nHeight) {
			var bIsWinXPSP2 = IsWinXPSP2();		// OS°¡ WinXP sp2ÀÎÁö Ã¼Å©
			
			var position = "dialogLeft:" + ((screen.height-nHeight)/2) + "px; dialogTop:" + ((screen.width-nHeight)/2) + "px";


			if(bIsWinXPSP2) {
				nHeight += 25;
			}

			var strMsg = new Object();
			strMsg.NoticeMsg1 = fparam1;
			strMsg.NoticeMsg2 = fparam2;

			var Retvalue = showModalDialog(furl,strMsg,"dialogWidth:"+nWidth+"px;dialogHeight:"+nHeight +"px; status:no; help:no; scroll:no");
			return Retvalue;
		}

		// °ÔÀÓ ½ºÅ¸Æ®½Ã È£ÃâÇÏ´Â ÇÔ¼ö.
		function f_clientDownX(pGameCode)		//pVal - 1:ÀÏ¹Ý, 2:Grid
		{
			//' f_isNMPcRoom()
			//' 1 : ³Ý¸¶ºí PC¹æ ¾Æ´Ô
			//' 2 : ³Ý¸¶ºí PC¹æ & °í¼Ó´Ù¿î·Îµå µ¿ÀÇ
			//' 3 : ³Ý¸¶ºí PC¹æ & °í¼Ó´Ù¿î·Îµå µ¿ÀÇ ¾Èf_clientDownPageRunÇÔ

			if(f_isNMPcRoom() == "1")			// ³Ý¸¶ºí PC¹æÀÌ ¾Æ´Ï¶ó¸é
			{
				//f_clientDownPageRun(pGameCode, '1');
				return false;
			}
			else if(f_isNMPcRoom() == "2")		// ³Ý¸¶ºí PC¹æ ÀÌ¶ó¸é Grid DownLoad
			{
				f_clientDownPageRun(pGameCode, '2');
				return true;
					
			}
			else								// ³Ý¸¶ºí PCÀÌµÇ µ¿ÀÇ¸¦ ¾ÈÇß´Ù¸é...
			{

				var UserDownloadChoice = f_modal('/cpage/ClientDownLoad/GameChannelDownLoadChoice.asp?game='+pGameCode, '', '', 400, 440)     
				// openWin(NM_DOMAIN_GAME4 +  '/channel/GameChannelDownLoadChoice.asp?game='+pGameCode, 400,420);		
				switch (UserDownloadChoice)
				{
					case "1"    //ÀÏ¹Ý ´Ù¿î·Îµå Å¬¸¯½Ã
						:   return false;
					case "2"    //ÃÊ°í¼Ó ´Ù¿î·Îµå ¼±ÅÃ½Ã
						:   if(f_isNMPcRoom() == "2")
								f_clientDownPageRun(pGameCode, '2');
							else
								openWin("/cpage/ClientDownLoad/GameChannelCallPcRoomOwner.asp",400,420);

							return true;
				}
			}
		}


		/*=============================================
		// DownLoad page¿¡¼­ »ç¿ëÇÏ´Â ÇÔ¼ö
		=============================================*/
		function f_clientDownPage(pGameCode, pX)		//pVal - 1:ÀÏ¹Ý, 2:Grid
		{

			//openWin(NM_DOMAIN_GAME4 +  '/channel/GameChannelDownLoadChoice.asp?game='+pGameCode, 400,420);		

			// ÀÏ¹Ý ´Ù¿î·Îµå Å¬¸¯½Ã ÀÏ¹Ý ´Ù¿î·Îµå ½ÇÇà.
			if(pX == "1")
			{
					f_clientDownPageRun(pGameCode, '1');							
		
			}
			else	// ÃÊ°í¼Ó ´Ù¿î·Îµå Å¬¸¯½Ã
			{
				if(f_isNMPcRoom() == "1")			// ³Ý¸¶ºí PC¹æÀÌ ¾Æ´Ï¶ó¸é ¹«Á¶°Ç ÀÏ¹Ý ´Ù¿î·Îµå·Î ÀüÈ¯.
				{
						if(confirm('³Ý¸¶ºí PC¹æÀÌ ¾Æ´Ñ °æ¿ì ÀÏ¹Ý ´Ù¿î·Îµå·Î ÀÚµ¿ ÀüÈ¯µË´Ï´Ù.\n\n°è¼Ó ÁøÇàÇÏ½Ã°Ú½À´Ï±î?'))
							f_clientDownPageRun(pGameCode, '1');											
				}
				else if(f_isNMPcRoom() == "2")		// ³Ý¸¶ºí PC¹æ ÀÌ¶ó¸é Grid DownLoad
				{
						f_clientDownPageRun(pGameCode, '2');
						
				}
				else					// ³Ý¸¶ºí PCÀÌµÇ µ¿ÀÇ¸¦ ¾ÈÇß´Ù¸é...
				{
						openWin("/cpage/ClientDownLoad/GameChannelCallPcRoomOwner.asp",400,420);
				}
			
			}


		}
		// DownLoad page¿¡¼­ »ç¿ëÇÏ´Â client page
		function f_clientDownPageRun(pGameCode, pVal)
		{
			//alert(typeof(parent.parent.hiddenClientDownload));
			// game4 ±ºÀÏ °æ¿ì iframe³»¿¡¼­ ÆäÀÌÁö¸¦ È£ÃâÇÏ±â ¶§¹®¿¡ 
			// ½ºÅ¸ÅÍ¸¦ È£ÃâÇÏ´Â ºÎºÐ¿¡ hiddenClientDownload iframeÀ» ³Ö¾îÁØ´Ù.
			if(typeof(parent.parent.hiddenClientDownload) == 'object')
			{
				// 1 : DIRECT, 2:GRIP
				if(pVal == "1")
					parent.parent.hiddenClientDownload.location.href = '/cpage/ClientDownLoad/ClientDownLoad.asp?gamecode='+pGameCode;
				else
					parent.parent.hiddenClientDownload.location.href = '/cpage/ClientDownLoad/ClientDownLoad.asp?gamecode='+pGameCode+'&mode='+pVal;
			
			}
			else if(typeof(parent.hiddenClientDownload) == 'object')
			{
				// 1 : DIRECT, 2:GRIP
				if(pVal == "1")
					parent.hiddenClientDownload.location.href = '/cpage/ClientDownLoad/ClientDownLoad.asp?gamecode='+pGameCode;
				else
					parent.hiddenClientDownload.location.href = '/cpage/ClientDownLoad/ClientDownLoad.asp?gamecode='+pGameCode+'&mode='+pVal;
			
			}
			else
			{
				if(pVal == "1")
					hiddenClientDownload.location.href = '/cpage/ClientDownLoad/ClientDownLoad.asp?gamecode='+pGameCode;
				else
					hiddenClientDownload.location.href = '/cpage/ClientDownLoad/ClientDownLoad.asp?gamecode='+pGameCode+'&mode='+pVal;

			}
			
			return;
		}

