var gGameCheckLevel = 3;
var gGameMemLevel = getCookArr('LEVEL','gCCV');
var gGameMemId = getCookArr('ID','gCCV');

var gBaseURL = getCookArr('TEST_URL');
if(gBaseURL) gBaseURL = gBaseURL + "/";
else gBaseURL = "http://www.club5678.com/";

var gGameBaseURL = getCookArr('TEST_GAME_URL');
if(gGameBaseURL) gGameBaseURL = gGameBaseURL + "/";
else gGameBaseURL = "http://clubgame.heykorean.com/";

// Å¬·´ °ÔÀÓ ViewCookie
function ___game_viewcookie() {
		var pop = window.open('http://devgame.heykorean.com/admin/viewCookie/viewCookieGame.html','','width=100,height=100,scrollbars=1,status=1,resizable=1');
		pop.focus();
}

//À¯ÀúÁ¤º¸ È£ÃâÇÏ±â
function open_plug(id,chnlNo) {
		if(id == "clubmaster"){
				alert(id + " ¾ÆÀÌµð´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. ");
		}
		//¾ÆÀÌµðÇÃ·¯½º ±â°£¿¬Àå ³¡
		if(getCookArr('STOP','gCCV') == "idplus"){
				not_memberGame();
				return;
		}
		if(gGameMemLevel < '1') { not_memberGame(); return; }
		
		if(!id) { alert('¾ÆÀÌµð°¡ ¾ø½À´Ï´Ù.'); return; }
		if(typeof(id) == 'number') id = id.toString();
		
		var re = new RegExp("^[0-9]+$");
		var r  = id.match(re);
		var idstr = '';
	
		if(r) idstr = 'chnlNo='+chnlNo+'&mem_no='+id;
		else idstr 	= 'chnlNo='+chnlNo+'&mem_id='+id;
	
		var winName = 'gameProfile_'+id
		var go_url = gGameBaseURL+'_global_game/pop/game_profile.html?'+idstr;
	
		var popup = window.open(go_url ,winName,'width=360,height=345,top=50,left=50');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}	
}


// Å¬·´ °ÔÀÓ ³» ¾ÆÀÌÅÛ,¾Æ¹ÙÅ¸µîÀÇ º¸À¯ ¾ÆÀÌÅÛ
function ___my_bag(bagType,mem_no) {
		if(gGameMemLevel < 3) {
				not_memberGame();
		} else {	
				if(bagType=="item"){
						var goURL = gGameBaseURL+"home/shop/myfolder/my_itemlist.html?mem_no="+mem_no;
				}else if(bagType=="avata"){
						var goURL = gGameBaseURL+"home/shop/myfolder/my_avatalist.html?mem_no="+mem_no;
				}else if(bagType=="card"){
						var goURL = gGameBaseURL+"home/shop/myfolder/my_cardlist.html?mem_no="+mem_no;
				}else if(bagType=="cash"){
						var goURL = gGameBaseURL+"home/shop/myfolder/my_cashlist.html?mem_no="+mem_no;
				}else if(bagType=="greet"){
						var goURL = gGameBaseURL+"home/shop/myfolder/my_greet.html?mem_no="+mem_no;
				}
				var popup = window.open(goURL,'myGameBag','width=10,height=10');
				if(popup == null){
						try{
								alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
						}catch(e){
								popup.focus();
						}
				}		
				return;	
		}
}

// Å¬·´ °ÔÀÓ °øÁö»çÇ×
function ___open_game_notice(notino,noticode,gubun) { //°øÁö»çÇ× ¶ç¿ì±â
		if(gGameMemLevel < 3) {
				not_memberGame();
				return;
		}else{
				if(gubun == "LIST") {
						var url = "/home/pop/notice_list.html";
				} else {
						var url = "/home/pop/notice.html";
				}
				url = url + "?notino=" + notino + "&noticode=" + noticode;
				var popup = window.open(url,"notice","width=626,height=450,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
				if(popup == null){
						try{
								alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
						}catch(e){
								popup.focus();
						}
				}				
		}
}


// ÇÃ·¡½¬°ÔÀÓ °ÔÀÓÆäÀÌÁö ÀÌµ¿
function go_flashgame(no,cate) {
		if(gGameMemLevel < 3) {
				not_memberGame();
				return;
		}
		var url = "";
		if(!no|| !cate) {
				var url = "/home/flashgame/flashgame_main.html?viewMode=main";
		} else {
				var url = "/home/flashgame/flashgame_main.html?viewMode=play&gameNo="+no+"&gameCate="+cate;
		}
		document.location.href = url;
		return;
}

// °¢Á¾°ÔÀÓ µµ¿ò¸»
function ___open_gameHelp(val) { // Å¬·´ °ÔÀÓ °ÔÀÓ¹æ¹ý
		if(gGameMemLevel < 3) {
				not_memberGame();
				return;
		}
		var url = "";
		switch (val) {
				case "upoker" : url = gGameBaseURL+"_global_game/game/upoker/manual/manual_upoker_webf.html"; break;
				case "umatgo" : url = gGameBaseURL+"_global_game/game/umatgo/manual/manual_umatgo_webf.html"; break;		
				case "usutda" : url = gGameBaseURL+"_global_game/game/usutda/manual/manual_usutda_webf.html"; break;	
				case "baduki" : url = gGameBaseURL+"_global_game/game/baduki/manual/manual_baduki_webf.html"; break;	
				case "ugostop" : url = gGameBaseURL+"_global_game/game/ugostop/manual/manual_ugostop_webf.html"; break;	
				case "yut" : url = gGameBaseURL+"_global_game/game/yut/manual/manual_yut_webf.html"; break;	
				case "hoola" : url = gGameBaseURL+"_global_game/game/hoola/manual/manual_hoola_webf.html"; break;	
				case "usachun" : url = gGameBaseURL+"_global_game/game/usachun/manual/manual_usachun_webf.html"; break;	
				case "janggi" : url = gGameBaseURL+"_global_game/game/janggi/manual/manual_janggi_webf.html"; break;	
		}
	
		if(url != ""){
				var popup = window.open(url,'','width=470,height=534,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
				if(popup == null){
						try{
								alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
						}catch(e){
								popup.focus();
						}
				}
		}
		return;
}

// °ÔÀÓÂÊ ¾ÆÀÌÅÛ ±¸¸Å ÆË¾÷
function ___open_item_pop(act,cate1,cate2,icode,openType,gift_param,add_param){
		var _url = null;
		if(gGameMemLevel < '3') { not_memberGame(); return; }
		
		if(!cate1 || !icode) { alert('not param...'); return; }
		if(!gift_param) gift_param = '';
		if(!add_param) add_param = '';
		
		switch(act) {
				case 'buy' :
						_url = gGameBaseURL+'home/shop/pop/buy_pop.html?cate1='+cate1+'&cate2='+cate2+'&icode='+icode+'&openType='+openType+add_param;
				break;
				case 'gift' :
						_url = gGameBaseURL+'home/shop/pop/gift_pop.html?cate1='+cate1+'&cate2='+cate2+'&icode='+icode+gift_param+add_param;
				break;
				default : alert('unknown act'); return;
		}
		var popup = window.open(_url,'','width=300,height=420,top=10,left=10');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

//¿À¸µ±Ý°í »ç¿ëÇÏ±â
function open_pop_moneyBox(val){
		switch(val) {
				case 'umatgo' :
						var _url = '/home/umatgo/inc/inc.pop.moneyBox.html';
				break;
				case 'upoker' :
						var _url = '/home/upoker/inc/inc.pop.moneyBox.html';
				break;		
		}
		var popup = window.open(_url,'','width=300,height=264,top=10,left=10');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

//°ÔÀÓ·±Ã³ È£Ãâ½ÇÆÐ
function __gameObjectFail() {
		var divFailLayer = document.getElementById("activxFailDiv");
		divFailLayer.style.display = "block";
}

//ÇÃ·¡½Ã,¿¢Æ¼ºê¿¢½ºµî object ÅÂ±×¸¦ »ç¿ëÇÒ¶§
function __setGameObject() { 
		var obj = new String; 
		var gid = new String;
		var fid = new String;
		var parameter = new String; 
		var embed = new String; 
		var html = new String; 
		var allParameter = new String; 
		var clsid = new String; 
		var codebase = new String; 
		var pluginspace = new String; 
		var embedType = new String; 
		var src = new String; 
		var width = new String; 
		var height = new String; 

		this.init = function(getType,s,w,h,v) { 
				switch(getType){
						case 'F':
								clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
								codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"; 
								pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
								EmbedType = "application/x-shockwave-flash"; 
								parameter += "<param name='movie' value='"+ s + "'>\n";  
								parameter += "<param name='quality' value='high'>\n";    
								parameter += "<param name='allowScriptAccess' value='always'>\n";    
								src = s; 
								width = w; 
								Height = h;
						break;
						case 'FG':
								fid = "platform";
								clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
								codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"; 
								pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
								EmbedType = "application/x-shockwave-flash"; 
								parameter += "<param name='movie' value='"+ s + "'>\n";  
								parameter += "<param name='quality' value='high'>\n";    
								parameter += "<param name='allowScriptAccess' value='always'>\n";    			
								src = s; 
								width = w; 
								Height = h;	
						break;
						case 'NG':
								gid = "ClubGameUpdateCtrl";
								clsid = "B9C69177-2123-40C0-923D-B32735FB10C0";
								width = "1";
								Height = "1";
								codebase = "http://www.club5678.com/etc/game/launcher.cab#version=1,0,0,3";
						break;
						case 'G':
								gid = "ClubCtrl";
								clsid = "DA6B7867-9062-4B2F-BD76-AD4653FF480E";
								width = "1";
								Height = "1";
								codebase = "http://clubgame.heykorean.com/inc/ILauncher.cab#version="+v;
						break;
						case 'GV':
								gid = "ClubCtrl";
								clsid = "ECEB25F5-3DFC-469C-910D-BCBE4BC87D9E";
								width = "1";
								Height = "1";
								codebase = "http://clubgame.heykorean.com/inc/ClubLauncher.cab#version="+v;		
						break;
						case 'B':
								gid = "LETS";
								clsid = "108F2C1A-D94B-48a1-B150-AA7A7C69DEE7";
								width = "0";
								Height = "0";
								codebase = "http://www.superstone.co.kr/game/SuperStoneLauncher.CAB#version="+v;		
						break;
						case 'H':
								gid = "ID_CAMAX";
								clsid = "90CA3632-CD9F-47ED-ADA2-E2BF09F2E98D";
								width = "0";
								Height = "0";
								codebase = "";	
						break;
						case 'FG':
						break;
				}
		} 
		this.parameter = function( parm , value ) {      
				parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
				allParameter += " "+parm + "='"+ value+"'"; 
		}  

		this.show = function() { 
				if(gid!=""){
						if(gid=="ClubGameUpdateCtrl")	html = "<object id='"+ gid +"' classid='clsid:"+ clsid +"' codebase='"+ codebase +"' onerror='__gameObjectFail();'  width='"+ width +"' height='"+ Height +"'></object>\n"; 
						else html = "<object id='"+ gid +"' classid='clsid:"+ clsid +"' codebase='"+ codebase +"' width='"+ width +"' height='"+ Height +"'></object>\n"; 
				}else{
						if (fid!=""){
								obj = "<object id='"+ fid +"' classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ Height +"' align='middle'>\n"; 
						}else{ 
								obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ Height +"'>\n"; 
						} 
						Embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ EmbedType + "' width='"+ width + "' height='"+ Height +"'"+ allParameter +" ></embed>\n"; 
						if (obj!="") { 
				  			Embed += "</object>\n"; 
						} 
						html = obj + parameter + Embed; 
				}
				document.write( html );  
		} 
}

function open_gameDoumi(){
		var szUrl = gGameBaseURL+"_global_game/customer/customer_main.html";
		window.location.href= szUrl;		
}

function open_gameCs(){
		var url = gBaseURL+"global_union/help_menu/faq_top2.html?menu_id=79&group_id=2" ;
		var popup = window.open(url, "open_help","width=534,height=561,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}	
}

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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function not_memberGame(){
		if(gGameMemLevel<1){
		    alert('Å¬·´°ÔÀÓÀ» ÀÌ¿ëÇÏ½Ã±â À§ÇØ¼­´Â ·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
		    window.location.href="http://www.heykorean.com/help/login_proc.asp?ret=" + encodeURIComponent(gGameBaseURL);
	  }else if(gGameMemLevel==1){
		    alert('ÁË¼ÛÇÕ´Ï´Ù. ¸¸ 19¼¼ ¹Ì¸¸Àº º» ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
		    window.location.href=gGameBaseURL;	  	
	  }else if(gGameMemLevel==2){
		    alert('ÁË¼ÛÇÕ´Ï´Ù. º» ¼­ºñ½º´Â ¼ºÀÎÀÎÁõ ÈÄ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
		    window.location.href="http://www.heykorean.com/help/login_proc.asp?ret=" + encodeURIComponent(gGameBaseURL);
	  }
}

//ÀÚÁÖÇÏ´Â Áú¹®
function __open_gameFaq(){
		var _url = gGameBaseURL+'home/pop/faq/pop_faq.html';
		var popup = window.open(_url,'','width=540,height=571,top=10,left=10');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}		
}

//Á¦¾ÈÇÏ±â ÆË¾÷
function __open_proposal(){
		if(gGameMemLevel>=3){
				alert('Á¦¾ÈÇÏ±â ÇÁ·Î±×·¥À» ÀÏ½Ã Áß´ÜÇÕ´Ï´Ù.\n\nÀÚ¼¼ÇÑ ³»¿ëÀº °øÁö»çÇ×À» Âü°íÇØÁÖ¼¼¿ä!');
				//var szUrl = gGameBaseURL+"_global_game/proposal/proposal_main.html";
				//window.location.href= szUrl;
		}else{
				not_memberGame();
		}	
}

//Å¬·´ Ä·ÆäÀÎ ¹Ù·Î°¡±â 
function __goCampaign(val){
		if(gGameMemLevel>=3){
				if(!val||val=='2')	var szUrl = gGameBaseURL+"home/event/event_main.html?viewMode=campaign2";
				else var szUrl = gGameBaseURL+"home/event/event_main.html?viewMode=campaign";
				window.location.href= szUrl;
		}else{
				not_memberGame();
		}	
}

// Æ÷ÀÎÆ® ÃæÀüÇÏ±â
function charge_pointG(){ 
		if(parseInt(getCookArr('LEVEL','gCCV')) >= 3) {
				window.open("https://www.heykorean.com/HK_Payment/pop_Payment.asp","","width=100,height=100,scrollbars=0,resizable=0,toolbar=0,status=0,menubar=0,location=0,directories=0");
		}else{
				not_memberGame();
		}
}

function __joinVip(val){
		szURL = gGameBaseURL+"home/pop/game_joinVip_070720.html?gameType="+val;
		var popup = window.open(szURL, "cash","top=10,left=10,width=460,height=530,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

//·¹ÀÌ¾î º¸ÀÌ±â °¨Ãß±â
function __chgDiv(divName,chgVlu){
		var divLayer	 = document.getElementById(divName);
		if(chgVlu=='show')	divLayer.style.display = "block";
		else if(chgVlu=='hide')	divLayer.style.display = "none";
}

//GÆ÷ÀÎÆ®±¸ÇÏ±â
function getExchgGpointJs(today,gameType,itemPrice){
		var getPoint = ((Math.floor(itemPrice*0.001))*1000)*0.05;
		var getPointMode = 'normal';
		if(itemPrice<1000){
				getPoint = 0;
				return getPoint;
		}		
		if(gameType=='41'){ //Æ÷Ä¿
				var vipChk 		= getCookArr('VIP3','gLAMP');
				var vipChkDt 	= getCookArr('VIP3_END_DT','gLAMP');
		}else if(gameType=='51'){ //¸Â°í
				var vipChk 		= getCookArr('VIP2','gLAMP');
				var vipChkDt 	= getCookArr('VIP2_END_DT','gLAMP');
		}
		var arExp = vipChkDt.split('-');
		var vipChkDt = arExp[0]+arExp[1]+arExp[2];
		if(vipChk=='Y'&&Number(vipChkDt)>Number(today)) getPointMode='vip';

		if(getPointMode=='vip'){
				if(itemPrice>=40000) getPoint = ((Math.floor(itemPrice*0.001))*1000)*0.075;
				else getPoint = ((Math.floor(itemPrice*0.001))*1000)*0.06;
		}			
		return getPoint;
}

// ¾ÆÀÌÅÛ »ç¿ëÇÏ±â 
function ___open_item_use(rCATE2,rICODE,rNO,url){
		if(gGameMemLevel < '3') { not_memberGame(); return; }
		
		if (url.indexOf("http://")!=-1)	url = url + "?cate2="+rCATE2+"&icode="+rICODE+"&no="+rNO;
		else							url = gGameBaseURL + url + "?cate2="+rCATE2+"&icode="+rICODE+"&no="+rNO;
		var popup = window.open(url,'','width=300,Height=400,top=0,left=0');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

// VIP Á¤º¸ ¼öÁ¤
function ___modi_vip(vipType) {
		if(!vipType) var vipType = "umatgo";
		var goURL = gGameBaseURL+"home/shop/vip_modi.html?vipType="+vipType;
		var popup = window.open(goURL,'vipModi','width=10,height=10');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
		return;	
}

// Å¬·´ °ÔÀÓ ¸®ÇÊµî °øÅë ÆË¾÷ (ÇÏ´Ü ¾Æ¹ÙÅ¸)
function ___open_popComm(chk,gameType,chk2){
		if(!chk) {
				alert("Àß¸øµÈ È£ÃâÀÔ´Ï´Ù.");
				var link = window.location.href;
				alert(link);
				return;
		}
		var url = gGameBaseURL+"_global_game/game/"+gameType+"/pop_game_comm.html?popChk="+chk+"&popChk2="+chk2;
		var popup = window.open(url,'', 'width=10,height=10,top=10,left=10,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no');
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
		return;
}

// Å¬·´ °ÔÀÓ ¾ÆÀÌÅÛ (»ó¼¼¼³¸í)
function ___open_itemDetail(gameType,url){ 
		if(gLEVEL < 3) {
				not_memberGame();
				return;
		}	
		var goURL = gGameBaseURL+"home/shop/detail/"+gameType+"/"+url;
		var popup	= window.open(goURL,"","width=510,height=670,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

// Ãâ¼®¸®ÇÊ ÆË¾÷
function attendRefill(){ 
		if(gLEVEL < 3) {
				not_memberGame();
				return;
		}	
		var goURL = gGameBaseURL+"home/pop/game_attendRefill.html";
		var popup	= window.open(goURL,"","width=510,height=670,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

// ÇÑ¹æ¿¡ ºÎÀÚµÇ±â ÆË¾÷
function oneShotPrize(){ 
		if(gLEVEL < 3) {
				not_memberGame();
				return;
		}	
		var goURL = gGameBaseURL+"_global_game/pop/game_oneShotPrize.html";
		var popup	= window.open(goURL,"","width=510,height=670,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

// ÇÑ¹æ¿¡ ºÎÀÚµÇ±â ÆË¾÷
function oneShotPrizeList(){ 
		if(gLEVEL < 3) {
				not_memberGame();
				return;
		}	
		var goURL = gGameBaseURL+"_global_game/pop/game_oneShotPrizeList.html";
		var popup	= window.open(goURL,"","width=510,height=670,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
		if(popup == null){
				try{
						alert('ÆË¾÷Â÷´ÜÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.\n\nÀÎÅÍ³Ý ºê¶ó¿ìÀúÀÇ ¼³Á¤À» "ÆË¾÷ Ç×»ó Çã¿ë"À¸·Î ¹Ù²Ù½Ã¸é\nÇìÀÌÄÚ¸®¾È Å¬·´°ÔÀÓÀ» Á» ´õ Æí¸®ÇÏ°Ô ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				}catch(e){
						popup.focus();
				}
		}
}

//ÇìÀÌÄÚ¸®¾È °áÁ¦³»¿ª¸®½ºÆ® È£Ãâ
function point_list(){
		window.open('http://www.heykorean.com/hkpay/my_pay_list.asp','','width=570,height=450,scrollbars=no,resizable=no');
}